Changeset 24362 for main/trunk/greenstone2/bin/script/full-import.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-import.pl
r24192 r24362 33 33 BEGIN { 34 34 die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'}; 35 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 35 36 } 36 37 37 38 use strict; 38 use Config; # for getting the perlpath in the recommended way39 use util; 39 40 40 41 my $quoted_argv = join(" ", map { "\"$_\"" } @ARGV); 41 42 42 my $import_cmd = "import.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 $import_cmd = "\"$ENV{'PERLPATH'}\\Perl.exe\" -S $import_cmd"; 47 } else { 48 $import_cmd = "\"$ENV{'PERLPATH'}/perl\" -S $import_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 $import_cmd = "\"$Config{perlpath}\" -S $import_cmd"; 53 } 43 # need to ensure that the path to perl is quoted (in case there's spaces in it) 44 my $import_cmd = "\"".&util::get_perl_exec()."\" -S import.pl -removeold $quoted_argv"; 54 45 55 46 my $import_status = system($import_cmd)/256;
Note:
See TracChangeset
for help on using the changeset viewer.