- Timestamp:
- 2000-08-21T22:40:55+12:00 (24 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 4 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 } -
trunk/gsdl/lib/fileutil.cpp
r1437 r1438 263 263 ifstream file_in (filenamec); 264 264 if (file_in) { 265 file_in.seekg ( 256, ios::end);265 file_in.seekg (-256, ios::end); 266 266 char c; 267 267 file_in.get(c); 268 268 while (!file_in.eof()) { 269 if (c == '\n') return_str.clear(); 270 else return_str.push_back (c); 269 if (c == '\n') { 270 file_in.get(c); 271 if (!file_in.eof()) { 272 return_str.clear(); 273 if (c == '\\') return_str.push_back ('\\'); 274 return_str.push_back (c); 275 } 276 } else { 277 if (c == '\\') return_str.push_back ('\\'); 278 return_str.push_back (c); 279 } 271 280 file_in.get(c); 272 281 } 273 282 file_in.close(); 283 274 284 } 275 285 delete filenamec; -
trunk/gsdl/macros/collect.dm
r1437 r1438 630 630 } 631 631 632 _bildstatusscriptextra_ {} 632 # special header for status page 633 _bildstatusheader_ {_cgihead_ 634 _htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer_ 635 } 636 _bildstatusheader_[v=1] {_cgihead_ 637 _htmlhead_(onLoad="initialize();") 638 } 639 640 _bildstatusscriptextra_ { 641 var timer = 5; 642 function initialize() \{ 643 setTimeout("count_down()",1000); 644 \} 645 646 function count_down() \{ 647 if (timer==0) \{ 648 document.collectorform.submit(); 649 \} else \{ 650 window.status = "Building status update in "+timer+" seconds"; 651 timer--; 652 setTimeout("count_down()",1000); 653 \} 654 \} 655 } 656 633 657 _bildstatuscontent_ { 658 <form name="collectorform" method=post action="_gwcgi_"> 659 <input type=hidden name="e" value="_decodedcompressedoptions_"> 634 660 <center> 635 661 <table width=_pagewidth_> … … 638 664 </td></tr> 639 665 </table></center> 666 </form> 640 667 } 641 668 -
trunk/gsdl/src/recpt/collectoraction.cpp
r1437 r1438 238 238 ostream &logout) { 239 239 240 if (args["cp"] != "intro") { 240 text_t ¤t_page = args["cp"]; 241 242 if (current_page != "intro") { 241 243 // authenticate the user if authentication is available 242 244 args["uan"] = 1; … … 276 278 // turned on). 277 279 update_cfgfile_clone (args, logout); 280 } 281 282 if (current_page == "bildstatus") { 283 // if .final file exists then build has finished 284 text_t fbld = filename_cat (gsdlhome, "tmp", args["bc1dirname"] + ".bld.final"); 285 if (file_exists (fbld)) { 286 char *fbldc = fbld.getcstr(); 287 ifstream fbld_in (fbldc); 288 if (fbld_in) { 289 char c = fbld_in.get(); 290 fbld_in.close(); 291 if (c == '0') current_page = "bilddone"; 292 else current_page = "bildfail"; 293 } else { 294 // assume build failed (we shouldn't get here though ... right?) 295 current_page = "bildfail"; 296 } 297 delete fbldc; 298 } 278 299 } 279 300 … … 644 665 // _cfgfile_ -- if displaying the "configure collection" page 645 666 // _statusline_ -- if displaying the bildstatus page 646 // _ pagebanner_ -- may be set to _collector:plainbanner_ for some pages667 // _header_ -- may be set for pages that require it 647 668 648 669 text_t &collector_page = args["cp"]; … … 653 674 disp.setmacro ("pagescriptextra", "collector", "_" + collector_page + "scriptextra_"); 654 675 655 // set _pagebanner_ for those pages that don't want a fancy header (e.g. those656 // displayed in frames657 676 if (collector_page == "bildstatus") { 658 disp.setmacro (" pagebanner", "collector", "_plainbanner_");677 disp.setmacro ("header", "collector", "_" + collector_page + "header_"); 659 678 } 660 679
Note:
See TracChangeset
for help on using the changeset viewer.