[LON-CAPA-cvs] cvs: loncom /build Makefile doc/loncapafiles clearoutoldspreadsheetcache.piml

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 11 Dec 2002 22:20:11 -0000


albertel		Wed Dec 11 17:20:11 2002 EDT

  Added files:                 
    /doc/loncapafiles	clearoutoldspreadsheetcache.piml 

  Modified files:              
    /loncom/build	Makefile 
  Log:
  - yuck
  - Fixes BUG#1001, removes all nohist_caclulatedsheets files once
  - after the first run it creates the file
  /home/httpd/html/lon-status/removed_bad_calaculatedsheets
  - if this file exists it won't run
  
  
  
Index: loncom/build/Makefile
diff -u loncom/build/Makefile:1.136 loncom/build/Makefile:1.137
--- loncom/build/Makefile:1.136	Sun Oct 13 13:35:04 2002
+++ loncom/build/Makefile	Wed Dec 11 17:20:11 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 
 # Scott Harrison, your friendly neighborhood volunteer
-# $Id: Makefile,v 1.136 2002/10/13 17:35:04 harris41 Exp $
+# $Id: Makefile,v 1.137 2002/12/11 22:20:11 albertel Exp $
 
 # TYPICAL USAGE of this Makefile is primarily for two targets:
 # "make build" and "make install".
@@ -365,6 +365,11 @@
 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
 	tee -a WARNINGS
 
+clearoutoldspreadsheetcache:
+	cat $(SOURCE)/doc/loncapafiles/clearoutoldspreadsheetcache.piml | \
+	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
+	tee -a WARNINGS
+
 sendmail_fix:
 	cat $(SOURCE)/doc/loncapafiles/sendmail_fix.piml | \
 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
@@ -373,6 +378,7 @@
 postinstall:
 	make webserverconf
 	make reseval_fixup
+	make clearoutoldspreadsheetcache
 	make sanitycheck
 	make sendmail_fix
 

Index: doc/loncapafiles/clearoutoldspreadsheetcache.piml
+++ doc/loncapafiles/clearoutoldspreadsheetcache.piml
<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
	"http://lpml.sourceforge.net/DTD/piml.dtd">
<!-- reseval_fixup.piml -->
<!-- Guy Albertelli -->

<!-- $Id: clearoutoldspreadsheetcache.piml,v 1.1 2002/12/11 22:20:11 albertel Exp $ -->

<!--

This file is part of the LearningOnline Network with CAPA (LON-CAPA).

LON-CAPA is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

LON-CAPA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LON-CAPA; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

/home/httpd/html/adm/gpl.txt

http://www.lon-capa.org/

-->

<piml>
<targetroot>/</targetroot>
<files>
<file>
<target dist="default">/home/httpd/lonUsers</target>
<perlscript mode="fg">
my $checkfile='/home/httpd/html/lon-status/removed_bad_calaculatedsheets';
if ( -e $checkfile ) {
	exit;
}
# get a list of files
my @files=`find <TARGET /> -name nohist_calculatedsheets*`;
foreach my $file (@files) {
	chomp($file);
	unlink($file);
}
`touch $checkfile` 
</perlscript>
</file>
</files>
</piml>