Ignore:
Timestamp:
2002-04-05T09:27:33+12:00 (22 years ago)
Author:
sjboddie
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/convert_toc_dir.pl

    r2815 r3081  
    33# run convert_toc.pl on any html files found in the directory passed in on
    44# the command line (or any subdirs).
     5
     6die "\$GSDLOS not set !\n" if (!defined $ENV{GSDLOS});
     7my ($move, $separator);
     8if ($ENV{GSDLOS} eq "windows") {
     9  $move = "move";
     10  $separator = "\\";
     11} else {
     12  $move = "mv";
     13  $separator = "/";
     14}
    515
    616&recurse($ARGV[0]);
     
    2030    foreach my $file (@files) {
    2131    next if $file =~ /^\.\.?$/;
    22     my $fullpath = "$dir/$file";
     32    my $fullpath = "$dir$separator$file";
    2333    if (-d $fullpath) {
    2434        &recurse($fullpath);
    2535    } elsif ($file =~ /\.html?$/i) {
    2636        print STDERR "converting $fullpath\n";
    27         `convert_toc.pl < $fullpath > $fullpath.new`;
    28         `mv $fullpath.new $fullpath`;
     37        `convert_toc.pl $fullpath $fullpath.new`;
     38        `$move $fullpath.new $fullpath`;
    2939    }
    3040    }
Note: See TracChangeset for help on using the changeset viewer.