- Timestamp:
- 2011-08-03T21:17:30+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/incremental-import-onlyadd.pl
r24192 r24362 31 31 32 32 33 34 33 BEGIN { 35 34 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'}; … … 38 37 } 39 38 40 41 39 use strict; 42 43 use Config; # for getting the perlpath in the recommended way44 40 use dbutil; 45 41 use util; … … 60 56 exit(-1); 61 57 } 62 63 58 64 59 my $collection = pop @argv; … … 109 104 my $quoted_argv = join(" ", map { "\"$_\"" } @filtered_argv); 110 105 111 112 my $import_cmd = "import.pl";113 if($ENV{'PERLPATH'}) {114 106 # need to ensure that the path to perl is quoted (in case there's spaces in it) 115 if($ENV{'GSDLOS'} =~ m/windows/) { 116 $import_cmd = "\"$ENV{'PERLPATH'}\\Perl.exe\" -S $import_cmd"; 117 } else { 118 $import_cmd = "\"$ENV{'PERLPATH'}/perl\" -S $import_cmd"; 119 } 120 } else { 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"; 123 } 107 my $import_cmd = "\"".&util::get_perl_exec()."\" -S import.pl"; 124 108 125 109 if (-e $archiveinf_doc) { 126 $import_cmd .= " -keepold"; 127 110 $import_cmd .= " -keepold"; 128 111 } 129 112 else { … … 135 118 136 119 $import_cmd .= " $quoted_argv \"$collection\""; 137 138 120 139 121 my $import_status = system($import_cmd)/256;
Note:
See TracChangeset
for help on using the changeset viewer.