Diff for /loncom/build/install_web_site_cronjob between versions 1.4 and 1.11

version 1.4, 2003/01/26 23:13:46 version 1.11, 2012/01/28 23:16:27
Line 1 Line 1
 #!/usr/bin/perl  #!/usr/bin/perl
   
   # $Id$
   
 =pod  =pod
   
 =head1 NAME  =head1 NAME
Line 29  A secondary yet important function of B< Line 31  A secondary yet important function of B<
 also refreshes the documentation present on the install.lon-capa.org  also refreshes the documentation present on the install.lon-capa.org
 web site.  web site.
   
 It does depend on a file name LATEST-IS-something, where something is  This documentation is refreshed based on a file located inside
 the latest release of loncapa, that file should also contain a string  F</home/loninst/public_html/versions>.  This file is named
 that will be used to date the release.  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  The coding of this script is a strange brew of shell commands
 with perl.  with perl.
   
 =head1 AUTHOR  =head1 AUTHOR
   
 Scott Harrison 2002-07-19  
   
 =cut  =cut
   
 # --------------------------------------------- Making the tarball distribution  # --------------------------------------------- Making the tarball distribution
 #`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_PASSFILE=/home/loninst/.cvspass; export CVSROOT=:pserver:scott\@localhost:/home/cvs; rm -Rf loncapa-unstable; rm -Rf loncapa; cvs -Q export -r HEAD loncapa;`;  # 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_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_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');  open(OUT,'>/home/loninst/auto/loncapa/README');
 print(OUT <<END);  print(OUT <<END);
 This is a CVS export of LON-CAPA generated on:  This is a CVS export of LON-CAPA generated on:
Line 55  print(OUT <<END); Line 68  print(OUT <<END);
 To generate an installable tarball distribution from this file, you can  To generate an installable tarball distribution from this file, you can
 execute the following commands:  execute the following commands:
 cd loncom/build  cd loncom/build
   make build
 make tardist  make tardist
   
 Note that the installable tarball distribution (the 'tardist' target)  Note that the installable tarball distribution (the 'tardist' target)
Line 69  cd loncom/build Line 83  cd loncom/build
 make build  make build
 make install  make install
   
   In this case you will be need to create symbolic links for the following
   in loncom (unless you have done this previously):
   
   hosts.tab
   domain.tab
   dns_hosts.tab
   dns_domain.tab
   
   which will point at development_hosts.tab, development_domain.tab, 
   development_dns_hosts.tab, and development_dns_domain.tab respectively
   in loncom.
   
 For more information on Makefile targets, you can just enter the following  For more information on Makefile targets, you can just enter the following
 commands:  commands:
 cd loncom/build  cd loncom/build
Line 80  discuss them on one of the mailing lists Line 106  discuss them on one of the mailing lists
 http://mail.lon-capa.org/.  http://mail.lon-capa.org/.
 END  END
 close(OUT);  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`;  `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  # ---------------------------------------- Dynamically generating documentation
 `cd /home/loninst/auto/loncapa/loncom/build; make pdfdoc`;  
 `cd /home/loninst/auto/loncapa/loncom/build; make doc`;  system("rm /home/loninst/public_html/*html");
 `cd /home/loninst/auto/loncapa/loncom/build; cp docs.tar.gz /home/loninst/public_html/docs/.`;  
 `cd /home/loninst/public_html/docs; tar xzf docs.tar.gz`;  # pdf and doc targets are borken right now
   #`cd /home/loninst/auto/loncapa/loncom/build; make pdfdoc`;
   #`cd /home/loninst/auto/loncapa/loncom/build; make doc`;
   #`cd /home/loninst/auto/loncapa/loncom/build; cp docs.tar.gz /home/loninst/public_html/docs/.`;
   #`cd /home/loninst/public_html/docs; tar xzf docs.tar.gz`;
   
   `cd /home/loninst/auto/loncapa/loncom/build; make buildwebsite`;
   system("cp /home/loninst/auto/loncapa/doc/build/*.html /home/loninst/public_html/");
   
 # ------------------------------------ Copying over the latest unstable tarball  # ------------------------------------ Copying over the latest unstable tarball
 #my $filename=`cd /home/loninst/auto; find loncapa -type f -name *.tar.gz -maxdepth 1`;  #my $filename=`cd /home/loninst/auto; find loncapa -type f -name *.tar.gz -maxdepth 1`;
Line 95  close(OUT); Line 132  close(OUT);
 `cd /home/loninst/auto; cp -f loncapa-unstable.tar.gz ../public_html/versions/loncapa-unstable.tar.gz`;  `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`;  #`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`;  my $filename=`cd /home/loninst/public_html/versions; find . -type f -name LATEST-IS-* -maxdepth 1`;
 chomp($filename);  chomp($filename);
 $filename=~/LATEST-IS-(.*)/;  $filename =~ /LATEST-IS-(.*)/;
 my $version=$1;  my $version = $1;
 open(IN,"</home/loninst/public_html/versions/$filename");  open(IN,"</home/loninst/public_html/versions/$filename");
 my $releasedate=<IN>;  my $releasedate = <IN>;
 close(IN);  close(IN);
   
 # ------------------ Updating the download page with the date of the last build  # ------------------ Updating the download page with the date of the last build
 open(IN,"</home/loninst/public_html/docs/downloads/index.html");  open(IN,"</home/loninst/public_html/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;
   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,"</home/loninst/public_html/versions/$filename");
   my $releasedate = <IN>;
 close(IN);  close(IN);
 my $date=`date -I`; chomp($date);  # -------------- Updating the download page with the date of the last build
 my $text=join('',@lines);  open(IN,"</home/loninst/public_html/index.html");
 $text=~s/loncapa-unstable\.tar\.gz\<\/a\>.*?\./loncapa-unstable\.tar\.gz\<\/a\> (generated $date)\./;  my @lines = <IN>;
 $text=~s/LATESTVERSION/$version/g;  close(IN);
 $text=~s/LATESTDATE/$releasedate/g;  my $text = join('',@lines);
 open(OUT,">/home/loninst/public_html/docs/downloads/index.html");  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);  print(OUT $text);
 close(OUT);  close(OUT);
   

Removed from v.1.4  
changed lines
  Added in v.1.11


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