Changeset 24093 for main/trunk/greenstone2/bin/script
- Timestamp:
- 2011-05-26T14:45:49+12:00 (13 years ago)
- Location:
- main/trunk/greenstone2/bin/script
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/build
r23313 r24093 276 276 # option was given to build) 277 277 278 my $download_cmd = "perl -S gsWget.pl -P \"$importdir\" -np -nv"; 278 #$^X is a special variable containing the full path to the current perl executable we are in 279 my $download_cmd = "$^X -S gsWget.pl -P \"$importdir\" -np -nv"; 279 280 $download_cmd .= " -r -N -l inf -R \"*\\?*\""; 280 281 $download_cmd .= " -o \"$outfile.download\"" if $use_out; … … 325 326 if (-e $download_dir) { 326 327 # copy download_dir and all it contains to the import directory 327 my $download_cmd = "perl -S filecopy.pl"; 328 #$^X is a special variable containing the full path to the current perl executable we are in 329 my $download_cmd = "$^X -S filecopy.pl"; 328 330 $download_cmd .= " -collectdir \"$collectdir\"" if $collectdir =~ /\w/; 329 331 $download_cmd .= " -site \"$site\"" if $site =~ /\w/; … … 464 466 print $out "importing the $collection collection\n\n"; 465 467 466 my $import_cmd = "perl -S import.pl"; 468 #$^X is a special variable containing the full path to the current perl executable we are in 469 my $import_cmd = "$^X -S import.pl"; 467 470 $import_cmd .= " -out \"$outfile.import\"" if $use_out; 468 471 if ($append) { … … 510 513 print $out "building the $collection collection\n\n"; 511 514 512 my $build_cmd = "perl -S buildcol.pl"; 515 #$^X is a special variable containing the full path to the current perl executable we are in 516 my $build_cmd = "$^X -S buildcol.pl"; 513 517 514 518 my $removeold = 1; -
main/trunk/greenstone2/bin/script/full-buildcol.pl
r20925 r24093 48 48 } 49 49 } else { 50 $buildcol_cmd = "perl -S $buildcol_cmd"; 50 #$^X is a special variable containing the full path to the current perl executable we are in 51 $buildcol_cmd = "$^X -S $buildcol_cmd"; 51 52 } 52 53 -
main/trunk/greenstone2/bin/script/full-import.pl
r20925 r24093 48 48 } 49 49 } else { 50 $import_cmd = "perl -S $import_cmd"; 50 #$^X is a special variable containing the full path to the current perl executable we are in 51 $import_cmd = "$^X -S $import_cmd"; 51 52 } 52 53 -
main/trunk/greenstone2/bin/script/full-rebuild.pl
r20925 r24093 112 112 } 113 113 } else { 114 $launch_cmd = "perl -S "; 114 #$^X is a special variable containing the full path to the current perl executable we are in 115 $launch_cmd = "$^X -S "; 115 116 } 116 117 -
main/trunk/greenstone2/bin/script/gsConvert.pl
r23473 r24093 47 47 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'}; 48 48 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 49 50 if(!$ENV{'PERLPATH'}) { 51 my $full_perl_exec = $^X; 52 require File::Basename; 53 my $perl_path = File::Basename::dirname($full_perl_exec); 54 $ENV{'PERLPATH'} = $perl_path; 55 } 56 49 57 } 50 58 … … 54 62 use util; 55 63 use Cwd; 56 use File::Basename;57 64 58 65 # Are we running on WinNT or Win2000 (or later)? … … 406 413 # formulate the command 407 414 my $cmd = ""; 408 $cmd .= "perl -S ppttohtml.pl "; 415 $full_perl_path = &util::filename_cat($ENV{'PERLPATH'},"perl"); 416 $cmd .= "$full_perl_path -S ppttohtml.pl "; 409 417 $cmd .= " \"$input_filename\" \"$output_filestem.html\""; 410 418 $cmd .= " 2>\"$output_filestem.err\"" … … 439 447 # formulate the command 440 448 my $cmd = ""; 441 $cmd .= "perl -S xlstohtml.pl "; 449 $full_perl_path = &util::filename_cat($ENV{'PERLPATH'},"perl"); 450 $cmd .= "$full_perl_perl -S xlstohtml.pl "; 442 451 $cmd .= " \"$input_filename\" \"$output_filestem.html\""; 443 452 $cmd .= " 2>\"$output_filestem.err\"" … … 977 986 my $cmd = ""; 978 987 if ($timeout) {$cmd = "ulimit -t $timeout;";} 979 $cmd .= "perl -S pdftohtml.pl -zoom $pdf_zoom"; 988 $full_perl_path = &util::filename_cat($ENV{'PERLPATH'},"perl"); 989 $cmd .= "$full_perl_path -S pdftohtml.pl -zoom $pdf_zoom"; 980 990 $cmd .= " -c" if ($pdf_complex); 981 991 $cmd .= " -i" if ($pdf_ignore_images); … … 1051 1061 if ($timeout) {$cmd = "ulimit -t $timeout;";} 1052 1062 $output_type =~ s/.*\_(.*)/$1/i; 1053 $cmd .= "perl -S pdfpstoimg.pl -convert_to $output_type \"$input_filename\" \"$output_filestem\""; 1063 $full_perl_path = &util::filename_cat($ENV{'PERLPATH'},"perl"); 1064 $cmd .= "$full_perl_perl -S pdfpstoimg.pl -convert_to $output_type \"$input_filename\" \"$output_filestem\""; 1054 1065 if ($ENV{'GSDLOS'} !~ m/^windows$/i || $is_winnt_2000) { 1055 1066 $cmd .= " > \"$output_filestem.out\" 2> \"$output_filestem.err\""; -
main/trunk/greenstone2/bin/script/gti.pl
r18460 r24093 31 31 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'}; 32 32 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 33 } 34 33 34 if(!$ENV{'PERLPATH'}) { 35 my $full_perl_exec = $^X; 36 require File::Basename; 37 my $perl_path = File::Basename::dirname($full_perl_exec); 38 $ENV{'PERLPATH'} = $perl_path; 39 } 40 } 35 41 36 42 use iso639; … … 638 644 639 645 my $target_filepath = &util::filename_cat($gsdl_root_directory, $target_file); 640 my $cmd = "/opt/jdk1.6.0/bin/java -cp $classpath:$classpath/xalan.jar ApplyXSLT $target_language_code $gen_many_html_xsl_filepath $target_filepath | perl -S $split_script_filepath $target_file_directory"; 646 my $perl_exec = &util::filename_cat($ENV{'PERLPATH'}, "perl"); 647 my $java_exec = "java"; 648 if(defined($ENV{'JAVA_HOME'}) && $ENV{'JAVA_HOME'} ne ""){ 649 $java_exec = &util::filename_cat($ENV{'JAVA_HOME'}, "bin", "java"); 650 } 651 652 my $cmd = "$java_exec -cp $classpath:$classpath/xalan.jar ApplyXSLT $target_language_code $gen_many_html_xsl_filepath $target_filepath | $perl_exec -S $split_script_filepath $target_file_directory"; 641 653 my $response = `$cmd`; 642 654 &log_message($cmd); … … 644 656 &log_message("Created HTML operational files"); 645 657 646 $cmd = " /opt/jdk1.6.0/bin/java-cp $classpath:$classpath/xalan.jar ApplyXSLT $target_language_code $gen_index_xml_xsl_filepath $target_filepath > " . $target_file_directory . "help_index.xml"; # 2>/dev/null";658 $cmd = "$java_exec -cp $classpath:$classpath/xalan.jar ApplyXSLT $target_language_code $gen_index_xml_xsl_filepath $target_filepath > " . $target_file_directory . "help_index.xml"; # 2>/dev/null"; 647 659 $response = `$cmd`; 648 660 &log_message($cmd); -
main/trunk/greenstone2/bin/script/incremental-buildcol.pl
r21733 r24093 111 111 } 112 112 } else { 113 $buildcol_cmd = "perl -S $buildcol_cmd"; 113 #$^X is a special variable containing the full path to the current perl executable we are in 114 $buildcol_cmd = "$^X -S $buildcol_cmd"; 114 115 } 115 116 -
main/trunk/greenstone2/bin/script/incremental-import-onlyadd.pl
r21861 r24093 118 118 } 119 119 } else { 120 $import_cmd = "perl -S $import_cmd"; 120 #$^X is a special variable containing the full path to the current perl executable we are in 121 $import_cmd = "$^X -S $import_cmd"; 121 122 } 122 123 -
main/trunk/greenstone2/bin/script/incremental-import.pl
r23218 r24093 138 138 } 139 139 } else { 140 $import_cmd = "perl -S $import_cmd"; 140 #$^X is a special variable containing the full path to the current perl executable we are in 141 $import_cmd = "$^X -S $import_cmd"; 141 142 } 142 143 -
main/trunk/greenstone2/bin/script/incremental-rebuild.pl
r23192 r24093 93 93 } 94 94 } else { 95 $launch_cmd = "perl -S "; 95 #$^X is a special variable containing the full path to the current perl executable we are in 96 $launch_cmd = "$^X -S "; 96 97 } 97 98 -
main/trunk/greenstone2/bin/script/mirror.pl
r13053 r24093 116 116 # run the mirror program from the import directory 117 117 my $cmd = "cd $importdir; "; 118 $cmd .= "perl -S gsw3mir.pl -cfgfile $etcdir/w3mir.cfg"; 118 #$^X is a special variable containing the full path to the current perl executable we are in 119 $cmd .= "$^X -S gsw3mir.pl -cfgfile $etcdir/w3mir.cfg"; 119 120 # print "\n$cmd\n"; 120 121 `$cmd`; … … 126 127 elsif ((-e "$etcdir/wget.cfg") && (-e "$etcdir/wget.url")) { 127 128 $ENV{WGETRC} = "$etcdir/wget.cfg"; 128 my $cmd = " perl-S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir";129 my $cmd = "$^X -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir"; 129 130 system($cmd); 130 131 }
Note:
See TracChangeset
for help on using the changeset viewer.