[LON-CAPA-cvs] cvs: loncom /build install_web_site_cronjob

harris41 lon-capa-cvs@mail.lon-capa.org
Sat, 01 Feb 2003 18:22:34 -0000


harris41		Sat Feb  1 13:22:34 2003 EDT

  Modified files:              
    /loncom/build	install_web_site_cronjob 
  Log:
  making documentation more readable; tidying up some of the coding beauty
  
  
Index: loncom/build/install_web_site_cronjob
diff -u loncom/build/install_web_site_cronjob:1.4 loncom/build/install_web_site_cronjob:1.5
--- loncom/build/install_web_site_cronjob:1.4	Sun Jan 26 18:13:46 2003
+++ loncom/build/install_web_site_cronjob	Sat Feb  1 13:22:34 2003
@@ -29,9 +29,12 @@
 also refreshes the documentation present on the install.lon-capa.org
 web site.
 
-It does depend on a file name LATEST-IS-something, where something is
-the latest release of loncapa, that file should also contain a string
-that will be used to date the release.
+This documentation is refreshed based on a file located inside
+F</home/loninst/public_html/versions>.  This file is named
+F<LATEST-IS-VERSIONNUMBER>, where
+I<VERSIONNUMBER> is the latest stable release of loncapa (e.g. 0.4 or 0.6.1).
+The F<LATEST-IS-VERSIONNUMBER> file contains a string
+that is used to date the release of the current stable version.
 
 The coding of this script is a strange brew of shell commands
 with perl.
@@ -43,8 +46,17 @@
 =cut
 
 # --------------------------------------------- Making the tarball distribution
+
+# In an ideal world, this tarball distribution would be always generated with
+# 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;`;
+
+# 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;`;
+
+# Generate a README file that advises them about dealing with the gunk.
 open(OUT,'>/home/loninst/auto/loncapa/README');
 print(OUT <<END);
 This is a CVS export of LON-CAPA generated on:
@@ -80,7 +92,10 @@
 http://mail.lon-capa.org/.
 END
 close(OUT);
+
+# Roll the directory together into the unstable tarball.
 `cd /home/loninst/auto; ln -s loncapa loncapa-unstable; tar cvvf loncapa-unstable.tar loncapa-unstable/* ;gzip -9 -f loncapa-unstable.tar`;
+
 # ---------------------------------------- Dynamically generating documentation
 `cd /home/loninst/auto/loncapa/loncom/build; make pdfdoc`;
 `cd /home/loninst/auto/loncapa/loncom/build; make doc`;
@@ -95,23 +110,24 @@
 `cd /home/loninst/auto; cp -f loncapa-unstable.tar.gz ../public_html/versions/loncapa-unstable.tar.gz`;
 #`cd /home/loninst/public_html/versions; rm -f loncapa-unstable.tar.gz; ln -s loncapa-$version-unstable.tar.gz loncapa-unstable.tar.gz`;
 
-#get latest version
+# ------------------------------------------------ Determine the latest version
 my $filename=`cd /home/loninst/public_html/versions; find . -type f -name LATEST-IS-* -maxdepth 1`;
 chomp($filename);
-$filename=~/LATEST-IS-(.*)/;
-my $version=$1;
+$filename =~ /LATEST-IS-(.*)/;
+my $version = $1;
 open(IN,"</home/loninst/public_html/versions/$filename");
-my $releasedate=<IN>;
+my $releasedate = <IN>;
 close(IN);
+
 # ------------------ Updating the download page with the date of the last build
 open(IN,"</home/loninst/public_html/docs/downloads/index.html");
-my @lines=<IN>;
+my @lines = <IN>;
 close(IN);
-my $date=`date -I`; chomp($date);
-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;
+my $date = `date -I`; chomp($date);
+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");
 print(OUT $text);
 close(OUT);