Files
help/helpcontent2/helpers/create_ilst.pl
Rüdiger Timm 353a112d28 INTEGRATION: CWS helpcontentbeta (1.1.2); FILE ADDED
2004/09/16 12:03:24 fpe 1.1.2.1: *** empty log message ***
2004-11-26 12:54:10 +00:00

38 lines
1.1 KiB
Perl

#!/usr/bin/perl
# creates the ilst control file for the
# help specific images
$helpdirprefix = "helpcontent2/source/";
$params = join "|", "",@ARGV,"";
($params =~ /-dir/) ? ($startdir = $params) =~ (s/.*-dir=([^\|]*).*$/$1/gs) : (($startdir = `pwd`) =~ s/\n//gs);
($params =~ /-out/) ? ($outdir = $params) =~ (s/.*-out=([^\|]*).*$/$1/gs) : (($outdir = `pwd`) =~ s/\n//gs);
($params =~ /-pre/) ? ($outdir = $params) =~ (s/.*-pre=([^\|]*).*$/$1/gs) : ($pre = "/res/helpimg/");
if (opendir DIR, $startdir) {
print $startdir;
@files = grep /png$/, readdir DIR;
for (sort(@files)) {
print "%GLOBAL%".$pre.$_."\n";
}
} else {
&terminate("Cannot access $startdir.");
}
sub terminate {
$err = shift;
print "$err\n\n";
$msg = <<"MSG";
create_ilst.pl -dir=[directory name] -out=[directory name]
-dir root directory for the help images to
be searched (default=current dir)
Only *.png will be found.
-pre directory prefix (default=/res/helpimg/)
-out output directory for the helpimg.ilst file
(default=current dir)
MSG
die "$msg\n";
}