--- loncom/build/install_web_site_cronjob 2003/02/03 18:03:52 1.6 +++ loncom/build/install_web_site_cronjob 2012/01/28 23:16:27 1.11 @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id: install_web_site_cronjob,v 1.11 2012/01/28 23:16:27 raeburn Exp $ + =pod =head1 NAME @@ -50,10 +52,10 @@ with perl. # the "make tardist" command. But instead, unstable is now defined as # "all the gunk we have been working on", whereas the # "make tardist" command means a "carefully inventoried selection of gunk". -#`cd /home/loninst/auto; export CVS_PASSFILE=/home/loninst/.cvspass; export CVSROOT=:pserver:scott\@localhost:/home/cvs; rm -Rf loncapa/[C][^V]*; rm -Rf loncapa/[^C]*; cvs -Q co loncapa; cd loncapa/loncom/build; make build 2>/dev/null; make tardist;`; +#`cd /home/loninst/auto; export CVS_RSH=ssh; export CVSROOT=:ext:loninst\@source.lon-capa.org:/home/cvs; rm -Rf loncapa/[C][^V]*; rm -Rf loncapa/[^C]*; cvs -Q co loncapa; cd loncapa/loncom/build; make build 2>/dev/null; make tardist;`; # The real world. Just give them all the gunk for the unstable distribution. -`cd /home/loninst/auto; export CVS_PASSFILE=/home/loninst/.cvspass; export CVSROOT=:pserver:scott\@localhost:/home/cvs; rm -Rf loncapa-unstable; rm -Rf loncapa; cvs -Q export -r HEAD loncapa;`; +`cd /home/loninst/auto; export CVS_RSH=ssh; export CVSROOT=:ext:loninst\@source.lon-capa.org:/home/cvs; rm -Rf loncapa-unstable; rm -Rf loncapa; cvs -Q co -r HEAD loncapa; cd /home/loninst/auto/loncapa; cvs -Q co -r HEAD modules/TexConvert/tthperl/compiles; cvs -Q co -r HEAD modules/TexConvert/tthperl/commands; cp -p loncom/xml/tth.pm modules/TexConvert/tthperl/tth.pm; `; # Generate a README file that advises them about dealing with the gunk. open(OUT,'>/home/loninst/auto/loncapa/README'); @@ -66,6 +68,7 @@ print(OUT <; close(IN); # ------------------ Updating the download page with the date of the last build -open(IN,"; close(IN); my $date = `date -I`; chomp($date); @@ -127,6 +150,33 @@ my $text = join('',@lines); $text =~ s/loncapa-unstable\.tar\.gz\<\/a\>.*?\./loncapa-unstable\.tar\.gz\<\/a\> (generated $date)\./; $text =~ s/LATESTVERSION/$version/g; $text =~ s/LATESTDATE/$releasedate/g; -open(OUT,">/home/loninst/public_html/docs/downloads/index.html"); +open(OUT,">/home/loninst/public_html/index.html"); print(OUT $text); close(OUT); + +#' +# ---------------------------------------- Determine the latest testing version +my $filename=`cd /home/loninst/public_html/versions; find . -type f -name LATEST-TESTING-IS-* -maxdepth 1`; +chomp($filename); +$filename =~ /LATEST-TESTING-IS-(.*)/; +my $version = $1; +open(IN,"; +close(IN); +# -------------- Updating the download page with the date of the last build +open(IN,"; +close(IN); +my $text = join('',@lines); +if ($version) { + $text =~ s/LATESTTESTINGVERSION/$version/g; + $text =~ s/LATESTTESTINGDATE/$releasedate/g; + $text =~ s/TESTINGRELEASE_START//g; + $text =~ s/TESTINGRELEASE_END//g; +} else { + $text =~ s/TESTINGRELEASE_START.*TESTINGRELEASE_END//gs; +} +open(OUT,">/home/loninst/public_html/index.html"); +print(OUT $text); +close(OUT); +