Changeset 1438 for trunk/gsdl/bin/script/build
- Timestamp:
- 2000-08-21T22:40:55+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/build
r1431 r1438 3 3 # This perl script may be called directly or by running build.bat on 4 4 # windows (build.bat is in bin\windows) 5 6 use FileHandle; 5 7 6 8 BEGIN { … … 11 13 "run setup.bat (windows)?\n" unless defined $ENV{'GSDLOS'}; 12 14 unshift (@INC, "$ENV{'GSDLHOME'}/perllib"); 15 16 STDOUT->autoflush(1); 17 STDERR->autoflush(1); 13 18 } 14 19 15 20 use parsargv; 16 21 use util; 17 use FileHandle;18 22 19 23 if (!parsargv::parse(\@ARGV, … … 153 157 print $out " or archives data. Try downloading an unbuilt version\n"; 154 158 print $out " of the collection from www.nzdl.org\n"; 159 &final_out (1) if $use_out; 155 160 die "\n"; 156 161 } 157 162 } 163 &final_out (0) if $use_out; 158 164 } 159 165 … … 177 183 } 178 184 } else { 185 &final_out (2) if $use_out; 179 186 die "\nimport.pl failed\n"; 180 187 } … … 200 207 } 201 208 } else { 209 &final_out (2) if $use_out; 202 210 die "\nbuildcol.pl failed\n"; 203 211 } … … 239 247 &util::rm ($file); 240 248 } 249 250 # creates a file called $outfile.final (should only be called if -out option 251 # is used and isn't STDERR or STDOUT) and writes an output code to it. 252 # An output code of 0 specifies that there was no error 253 sub final_out { 254 my ($exit_code) = @_; 255 256 if (open (FINAL, ">$outfile.final")) { 257 print FINAL $exit_code; 258 close FINAL; 259 } 260 }
Note:
See TracChangeset
for help on using the changeset viewer.