Changeset 24192
- Timestamp:
- 2011-06-22T17:39:13+12:00 (12 years ago)
- Location:
- main/trunk/greenstone2
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/build
r24125 r24192 43 43 use FileHandle; 44 44 use File::Copy; 45 use Config; # for getting the perlpath in the recommended way 45 46 46 47 BEGIN { … … 276 277 # option was given to build) 277 278 278 # $^Xis a special variable containing the full path to the current perl executable we are in279 my $download_cmd = "\"$ ^X\" -S gsWget.pl -P \"$importdir\" -np -nv";279 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 280 my $download_cmd = "\"$Config{perlpath}\" -S gsWget.pl -P \"$importdir\" -np -nv"; 280 281 $download_cmd .= " -r -N -l inf -R \"*\\?*\""; 281 282 $download_cmd .= " -o \"$outfile.download\"" if $use_out; … … 326 327 if (-e $download_dir) { 327 328 # copy download_dir and all it contains to the import directory 328 # $^Xis a special variable containing the full path to the current perl executable we are in329 my $download_cmd = "\"$ ^X\" -S filecopy.pl";329 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 330 my $download_cmd = "\"$Config{perlpath}\" -S filecopy.pl"; 330 331 $download_cmd .= " -collectdir \"$collectdir\"" if $collectdir =~ /\w/; 331 332 $download_cmd .= " -site \"$site\"" if $site =~ /\w/; … … 466 467 print $out "importing the $collection collection\n\n"; 467 468 468 # $^Xis a special variable containing the full path to the current perl executable we are in469 my $import_cmd = "\"$ ^X\" -S import.pl";469 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 470 my $import_cmd = "\"$Config{perlpath}\" -S import.pl"; 470 471 $import_cmd .= " -out \"$outfile.import\"" if $use_out; 471 472 if ($append) { … … 513 514 print $out "building the $collection collection\n\n"; 514 515 515 # $^Xis a special variable containing the full path to the current perl executable we are in516 my $build_cmd = "\"$ ^X\" -S buildcol.pl";516 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 517 my $build_cmd = "\"$Config{perlpath}\" -S buildcol.pl"; 517 518 518 519 my $removeold = 1; -
main/trunk/greenstone2/bin/script/full-buildcol.pl
r24125 r24192 35 35 36 36 use strict; 37 use Config; # for getting the perlpath in the recommended way 37 38 38 39 my $quoted_argv = join(" ", map { "\"$_\"" } @ARGV); … … 48 49 } 49 50 } else { 50 # $^Xis a special variable containing the full path to the current perl executable we are in51 $buildcol_cmd = "\"$ ^X\" -S $buildcol_cmd";51 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 52 $buildcol_cmd = "\"$Config{perlpath}\" -S $buildcol_cmd"; 52 53 } 53 54 -
main/trunk/greenstone2/bin/script/full-import.pl
r24125 r24192 36 36 37 37 use strict; 38 use Config; # for getting the perlpath in the recommended way 38 39 39 40 my $quoted_argv = join(" ", map { "\"$_\"" } @ARGV); … … 48 49 } 49 50 } else { 50 # $^Xis a special variable containing the full path to the current perl executable we are in51 $import_cmd = "\"$ ^X\" -S $import_cmd";51 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 52 $import_cmd = "\"$Config{perlpath}\" -S $import_cmd"; 52 53 } 53 54 -
main/trunk/greenstone2/bin/script/full-rebuild.pl
r24125 r24192 42 42 use strict; 43 43 44 use Config; # for getting the perlpath in the recommended way 44 45 use util; 46 45 47 46 48 sub main … … 112 114 } 113 115 } else { 114 # $^Xis a special variable containing the full path to the current perl executable we are in115 $launch_cmd = "\"$ ^X\" -S ";116 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 117 $launch_cmd = "\"$Config{perlpath}\" -S "; 116 118 } 117 119 -
main/trunk/greenstone2/bin/script/gsConvert.pl
r24169 r24192 49 49 50 50 if(!$ENV{'PERLPATH'}) { 51 my $full_perl_exec = $ ^X;51 my $full_perl_exec = $Config{perlpath}; #$^X; 52 52 require File::Basename; 53 53 my $perl_path = File::Basename::dirname($full_perl_exec); … … 62 62 use util; 63 63 use Cwd; 64 use Config; # for getting the perlpath in the recommended way 65 # Note: even though this (and other) use statement comes after its 66 # usage in BEGIN, the use statement is in fact executed before BEGIN. 67 64 68 65 69 # Are we running on WinNT or Win2000 (or later)? -
main/trunk/greenstone2/bin/script/gti.pl
r24125 r24192 33 33 34 34 if(!$ENV{'PERLPATH'}) { 35 my $full_perl_exec = $ ^X;35 my $full_perl_exec = $Config{perlpath}; #$^X; 36 36 require File::Basename; 37 37 my $perl_path = File::Basename::dirname($full_perl_exec); … … 43 43 use strict; 44 44 use util; 45 use Config; # for getting the perlpath (above!) in the recommended way 45 46 46 47 -
main/trunk/greenstone2/bin/script/incremental-buildcol.pl
r24125 r24192 42 42 no strict 'subs'; # allow barewords (eg STDERR) as function arguments 43 43 44 use Config; # for getting the perlpath in the recommended way 44 45 use util; 45 46 use colcfg; … … 111 112 } 112 113 } else { 113 # $^Xis a special variable containing the full path to the current perl executable we are in114 $buildcol_cmd = "\"$ ^X\" -S $buildcol_cmd";114 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 115 $buildcol_cmd = "\"$Config{perlpath}\" -S $buildcol_cmd"; 115 116 } 116 117 -
main/trunk/greenstone2/bin/script/incremental-import-onlyadd.pl
r24125 r24192 41 41 use strict; 42 42 43 use Config; # for getting the perlpath in the recommended way 43 44 use dbutil; 44 45 use util; … … 118 119 } 119 120 } else { 120 # $^Xis a special variable containing the full path to the current perl executable we are in121 $import_cmd = "\"$ ^X\" -S $import_cmd";121 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 122 $import_cmd = "\"$Config{perlpath}\" -S $import_cmd"; 122 123 } 123 124 -
main/trunk/greenstone2/bin/script/incremental-import.pl
r24125 r24192 41 41 use strict; 42 42 43 use Config; # for getting the perlpath in the recommended way 43 44 use dbutil; 44 45 use util; … … 138 139 } 139 140 } else { 140 # $^Xis a special variable containing the full path to the current perl executable we are in141 $import_cmd = "\"$ ^X\" -S $import_cmd";141 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 142 $import_cmd = "\"$Config{perlpath}\" -S $import_cmd"; 142 143 } 143 144 -
main/trunk/greenstone2/bin/script/incremental-rebuild.pl
r24125 r24192 42 42 use strict; 43 43 44 use Config; # for getting the perlpath in the recommended way 44 45 use util; 45 46 … … 93 94 } 94 95 } else { 95 # $^Xis a special variable containing the full path to the current perl executable we are in96 $launch_cmd = "\"$ ^X\" -S ";96 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 97 $launch_cmd = "\"$Config{perlpath}\" -S "; 97 98 } 98 99 -
main/trunk/greenstone2/bin/script/mirror.pl
r24125 r24192 48 48 } 49 49 50 use Config; # for getting the perlpath in the recommended way 50 51 use arcinfo; 51 52 use colcfg; … … 116 117 # run the mirror program from the import directory 117 118 my $cmd = "cd $importdir; "; 118 # $^Xis a special variable containing the full path to the current perl executable we are in119 $cmd .= "\"$ ^X\" -S gsw3mir.pl -cfgfile $etcdir/w3mir.cfg";119 #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 120 $cmd .= "\"$Config{perlpath}\" -S gsw3mir.pl -cfgfile $etcdir/w3mir.cfg"; 120 121 # print "\n$cmd\n"; 121 122 `$cmd`; … … 127 128 elsif ((-e "$etcdir/wget.cfg") && (-e "$etcdir/wget.url")) { 128 129 $ENV{WGETRC} = "$etcdir/wget.cfg"; 129 my $cmd = "\"$ ^X\" -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir";130 my $cmd = "\"$Config{perlpath}\" -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir"; 130 131 system($cmd); 131 132 } -
main/trunk/greenstone2/perllib/cgiactions/baseaction.pm
r24126 r24192 30 30 31 31 use inexport; 32 use Config; # for getting the perlpath in the recommended way 32 33 33 34 our $authenication_enabled = 0; … … 433 434 my $gsdl_cgi = $self->{'gsdl_cgi'}; 434 435 435 my $sendmail_command = "\"$ ^X\" -S sendmail.pl";436 my $sendmail_command = "\"$Config{perlpath}\" -S sendmail.pl"; 436 437 $sendmail_command .= " -to \"" . $mail_to_address . "\""; 437 438 $sendmail_command .= " -from \"" . $mail_from_address . "\""; … … 462 463 $perl_args = "-collectdir \"$collect_dir\" " . $perl_args; 463 464 464 my $perl_command = "\"$ ^X\" -S $script $perl_args";465 my $perl_command = "\"$Config{perlpath}\" -S $script $perl_args"; 465 466 466 467 -
main/trunk/greenstone2/perllib/cgiactions/buildaction.pm
r24126 r24192 36 36 37 37 use util; 38 use Config; # for getting the perlpath in the recommended way 38 39 39 40 BEGIN { … … 138 139 139 140 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 140 my $cmd = "\"$ ^X\" -S full-import.pl \"$collect\"";141 my $cmd = "\"$Config{perlpath}\" -S full-import.pl \"$collect\""; 141 142 142 143 my ($status,$report) = $self->run_build_cmd($cmd); … … 177 178 178 179 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 179 my $cmd = "\"$ ^X\" -S full-buildcol.pl \"$collect\"";180 my $cmd = "\"$Config{perlpath}\" -S full-buildcol.pl \"$collect\""; 180 181 181 182 my ($status,$report) = $self->run_build_cmd($cmd); … … 215 216 216 217 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 217 my $cmd = "\"$ ^X\" -S full-rebuild.pl \"$collect\"";218 my $cmd = "\"$Config{perlpath}\" -S full-rebuild.pl \"$collect\""; 218 219 219 220 my ($status,$report) = $self->run_build_cmd($cmd); … … 255 256 256 257 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 257 my $cmd = "\"$ ^X\" -S incremental-import.pl \"$collect\"";258 my $cmd = "\"$Config{perlpath}\" -S incremental-import.pl \"$collect\""; 258 259 259 260 my ($status,$report) = $self->run_build_cmd($cmd); … … 294 295 295 296 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 296 my $cmd = "\"$ ^X\" -S incremental-buildcol.pl \"$collect\"";297 my $cmd = "\"$Config{perlpath}\" -S incremental-buildcol.pl \"$collect\""; 297 298 298 299 my ($status,$report) = $self->run_build_cmd($cmd); … … 333 334 334 335 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 335 my $cmd = "\"$ ^X\" -S incremental-rebuild.pl \"$collect\"";336 my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl \"$collect\""; 336 337 337 338 my ($status,$report) = $self->run_build_cmd($cmd); … … 403 404 404 405 ## my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 405 my $cmd = "\"$ ^X\" -S incremental-rebuild.pl -manifest \"$manifest_filename\" \"$collect\"";406 my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl -manifest \"$manifest_filename\" \"$collect\""; 406 407 407 408 ($status,$report) = $self->run_build_cmd($cmd); -
main/trunk/greenstone2/perllib/cgiactions/indexaction.pm
r24126 r24192 31 31 32 32 use cgiactions::baseaction; 33 33 use Config; # for getting the perlpath in the recommended way 34 34 35 35 … … 133 133 134 134 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 135 my $cmd = "\"$ ^X\" -S full-import.pl \"$collect\"";135 my $cmd = "\"$Config{perlpath}\" -S full-import.pl \"$collect\""; 136 136 137 137 my ($status,$report) = $self->run_build_cmd($cmd); … … 172 172 173 173 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 174 my $cmd = "\"$ ^X\" -S full-buildcol.pl \"$collect\"";174 my $cmd = "\"$Config{perlpath}\" -S full-buildcol.pl \"$collect\""; 175 175 176 176 my ($status,$report) = $self->run_build_cmd($cmd); … … 211 211 212 212 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 213 my $cmd = "\"$ ^X\" -S full-rebuild.pl \"$collect\"";213 my $cmd = "\"$Config{perlpath}\" -S full-rebuild.pl \"$collect\""; 214 214 215 215 my ($status,$report) = $self->run_build_cmd($cmd); … … 251 251 252 252 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 253 my $cmd = "\"$ ^X\" -S incremental-import.pl \"$collect\"";253 my $cmd = "\"$Config{perlpath}\" -S incremental-import.pl \"$collect\""; 254 254 255 255 my ($status,$report) = $self->run_build_cmd($cmd); … … 292 292 293 293 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 294 my $cmd = "\"$ ^X\" -S incremental-buildcol.pl \"$collect\"";294 my $cmd = "\"$Config{perlpath}\" -S incremental-buildcol.pl \"$collect\""; 295 295 296 296 my ($status,$report) = $self->run_build_cmd($cmd); … … 329 329 $self->lock_collection($username, $collect); 330 330 331 my $cmd = "\"$ ^X\" -S incremental-rebuild.pl \"$collect\"";331 my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl \"$collect\""; 332 332 333 333 my ($status,$report) = $self->run_build_cmd($cmd); -
main/trunk/greenstone2/perllib/g2futil.pm
r24126 r24192 15 15 use strict; 16 16 use util; 17 use Config; # for getting the perlpath in the recommended way 17 18 18 19 sub run_cmd_old … … 63 64 } 64 65 if (($prog =~ m/.pl$/i) && ($ENV{'GSDLOS'} =~ m/^windows/)) { 65 $prog ="\"$ ^X\" -S $prog";66 $prog ="\"$Config{perlpath}\" -S $prog"; 66 67 } 67 68 -
main/trunk/greenstone2/perllib/lucenebuilder.pm
r24126 r24192 44 44 use strict; 45 45 no strict 'refs'; 46 46 use Config; # for getting the perlpath in the recommended way 47 47 48 48 sub BEGIN { … … 82 82 else 83 83 { 84 $self->{'full_lucene_passes_exe'} = "\"$ ^X\" -S \"$lucene_passes_script\"";84 $self->{'full_lucene_passes_exe'} = "\"$Config{perlpath}\" -S \"$lucene_passes_script\""; 85 85 } 86 86 -
main/trunk/greenstone2/perllib/plugins/ConvertBinaryFile.pm
r24126 r24192 44 44 no strict 'refs'; # allow filehandles to be variables and viceversa 45 45 no strict 'subs'; 46 use Config; # for getting the perlpath in the recommended way 47 46 48 47 49 sub BEGIN { … … 277 279 # } 278 280 279 my $cmd = "\"$ ^X\" -S gsConvert.pl -verbose $verbosity ";281 my $cmd = "\"$Config{perlpath}\" -S gsConvert.pl -verbose $verbosity "; 280 282 if (defined $self->{'convert_options'}) { 281 283 $cmd .= $self->{'convert_options'} . " "; -
main/trunk/greenstone2/perllib/plugins/ConvertToRogPlugin.pm
r24126 r24192 31 31 use strict; 32 32 no strict 'refs'; # allow filehandles to be variables and viceversa 33 use Config; # for getting the perlpath in the recommended way 33 34 34 35 sub BEGIN { … … 121 122 # making sure the converter gives us the appropriate output type 122 123 my $output_type = lc($convert_to); 123 my $cmd = "\"$ ^X\" -S gsMusicConvert.pl -verbose $verbosity -errlog \"$errlog\" -output $output_type \"$tmp_filename\"";124 my $cmd = "\"$Config{perlpath}\" -S gsMusicConvert.pl -verbose $verbosity -errlog \"$errlog\" -output $output_type \"$tmp_filename\""; 124 125 $output_type = `$cmd`; 125 126
Note:
See TracChangeset
for help on using the changeset viewer.