File:  [LON-CAPA] / loncom / UPDATE
Revision 1.1: download - view: text, annotated - select for diffs
Tue Jan 3 20:00:20 2006 UTC (18 years, 3 months ago) by albertel
Branches: MAIN
CVS tags: version_2_1_X, HEAD
- wrapping UPDATE script in perl
- UPDATE checks return codes on each make statement for checking that it worked

    1: #!/usr/bin/perl
    2: my $script=<<CMD;
    3: touch loncom/build/WARNINGS
    4: rm WARNINGS
    5: ln -s loncom/build/WARNINGS WARNINGS
    6: cd loncom/build;make build
    7: make rawinstall
    8: make configinstall
    9: make updatequery
   10: make hosts_and_domain_tab
   11: make postinstall
   12: make run_searchcat
   13: make aboutVERSION
   14: CMD
   15: my @commands=split(/[\n;]/,$script);
   16: foreach $cmd (@commands) {
   17:     if ($cmd =~ /^cd\s+(\S*)/) {
   18: 	chdir($1);
   19:     } elsif (0 != system("$cmd")) {
   20: 	open(WARN,">>WARNINGS");
   21: 	my $error = '**** ERROR **** command "'.$cmd.'" failed'.$/;
   22: 	print WARN ($error);
   23: 	print($error);
   24: 	last;
   25:     }
   26: }
   27: system('make warningnote');

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>