Changeset 24362 for main/trunk/greenstone2/bin/script/full-buildcol.pl
- Timestamp:
- 2011-08-03T21:17:30+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/full-buildcol.pl
r24192 r24362 32 32 BEGIN { 33 33 die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'}; 34 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 34 35 } 35 36 36 37 use strict; 37 use Config; # for getting the perlpath in the recommended way38 use util; 38 39 39 40 my $quoted_argv = join(" ", map { "\"$_\"" } @ARGV); 40 41 41 42 my $buildcol_cmd = "buildcol.pl -removeold $quoted_argv"; 43 if($ENV{'PERLPATH'}) { 44 # need to ensure that the path to perl is quoted (in case there's spaces in it) 45 if($ENV{'GSDLOS'} =~ m/windows/) { 46 $buildcol_cmd = "\"$ENV{'PERLPATH'}\\Perl.exe\" -S $buildcol_cmd"; 47 } else { 48 $buildcol_cmd = "\"$ENV{'PERLPATH'}/perl\" -S $buildcol_cmd"; 49 } 50 } else { 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"; 53 } 42 my $buildcol_cmd = "\"".&util::get_perl_exec()."\" -S buildcol.pl -removeold $quoted_argv"; 54 43 55 44 my $buildcol_status = system($buildcol_cmd)/256;
Note:
See TracChangeset
for help on using the changeset viewer.