Changeset 5106


Ignore:
Timestamp:
2003-08-07T13:53:14+12:00 (21 years ago)
Author:
jrm21
Message:

need to chomp output of which java.
$opt_d should be "local", not "my"
changed some backticks to system commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/Kea-1.1.4/Kea

    r5016 r5106  
    8282if (system("which java >/dev/null 2>/dev/null")==0) {
    8383    $java_exec=`which java`;
     84    chomp $java_exec;
    8485} else {
    8586    $java_exec="$java_home/bin/java";
     
    9495# Parse command line options
    9596use Getopt::Std;
    96 my $opt_d=0; # debug option
     97local $opt_d=0; # debug option
    9798getopts("dtN:E:C:F:K:L:M:S:");
    9899
     
    222223    $file = $ARGV[$f];
    223224    $temp = "$data/$f";
     225    $temp =~ s@//@/@g;
    224226    $original_filename{$temp} = $file;
    225227
    226228    # copy the file to the data directory & coerce into a clause file
    227     if ($file =~ /.*\.clauses/) {
    228     `cp $file $temp.clauses`;
     229    if ($file =~ /.*\.clauses/i) {
     230    system("cp","$file","$temp.clauses");
    229231    } else {
    230     if ($file =~ /.*\.te?xt/) {
    231         `cp $file $temp.txt`;
     232    if ($file =~ /.*\.te?xt/i) {
     233        system("cp","$file","$temp.txt");
    232234    } elsif ($file =~ /.*\.html?/i) {
    233         `cp $file $temp.html`;
     235        system("cp", "$file", "$temp.html");
    234236        `$perl_command $gsdlhome/perllib/Kea-1.1.4/convert-html-to-text.pl $temp.html > $temp.txt`;
    235237    } elsif ($file =~ /.*\.cstr/) {
     
    290292    # open start the new document
    291293    ($doc) = $line =~ /Current document: (.*)\.clauses$/;
     294    $doc =~ s@//@/@g;
    292295    $document = $original_filename{$doc};
    293296    $document =~ s/\.[^\.]+$//;
Note: See TracChangeset for help on using the changeset viewer.