2 eval 'exec perl -wS $0 ${1+"$@"}'
4 #*************************************************************************
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 # Copyright 2008 by Sun Microsystems, Inc.
10 # OpenOffice.org - a multi-platform office productivity suite
12 # $RCSfile: create_ilst.pl,v $
16 # This file is part of OpenOffice.org.
18 # OpenOffice.org is free software: you can redistribute it and/or modify
19 # it under the terms of the GNU Lesser General Public License version 3
20 # only, as published by the Free Software Foundation.
22 # OpenOffice.org is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU Lesser General Public License version 3 for more details
26 # (a copy is included in the LICENSE file that accompanied this code).
28 # You should have received a copy of the GNU Lesser General Public License
29 # version 3 along with OpenOffice.org. If not, see
30 # <http://www.openoffice.org/license.html>
31 # for a copy of the LGPLv3 License.
33 #*************************************************************************
35 # creates the ilst control file for the
36 # help specific images
40 $params = join "|", "",@ARGV,"";
41 ($params =~ /-dir/) ?
($startdir = $params) =~ (s/.*-dir=([^\|]*).*$/$1/gs) : (($startdir = `pwd`) =~ s/\n//gs);
42 ($params =~ /-pre/) ?
($pre = $params) =~ (s/.*-pre=([^\|]*).*$/$1/gs) : ($pre = "helpimg");
44 my $startdir_regexp = quotemeta($startdir);
48 find
(sub{push @files, $File::Find
::name
if (($File::Find
::name
=~/\.png$/));},$startdir);
49 foreach ( @files ) { s
#.*$startdir_regexp[\\/]##; };
51 print "%GLOBALRES%/$pre/$_\n";
54 &terminate
("Cannot find $startdir.");
60 printf STDERR
"$err\n\n";
62 create_ilst.pl -dir=directory [-pre=string]
63 -dir root directory for the help images to
64 be searched (default=current dir)
65 Only *.png will be found.
66 -pre define directory prefix (default=helpimg)