[Commit] nickle-www update-web,1.1,1.2

Bart Massey commit at keithp.com
Fri Jun 6 18:23:31 PDT 2003


Committed by: bart

Update of /local/src/CVS/nickle-www
In directory home.keithp.com:/var/www/nickle

Modified Files:
	update-web 
Log Message:
Added code to avoid rerunning docbook2html on unchanged repository.



Index: update-web
===================================================================
RCS file: /local/src/CVS/nickle-www/update-web,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- update-web	6 Jun 2003 23:27:39 -0000	1.1
+++ update-web	7 Jun 2003 00:23:28 -0000	1.2
@@ -2,12 +2,32 @@
 NICKLEWEB=/var/www/nickle
 NICKLESRC=/local/src/nickle-src
 
+FORCE=false
+case $# in
+1) case "$1" in
+   -f) FORCE=true ;;
+   esac
+   ;;
+esac
+
 cd $NICKLEWEB && 
-rm -rf tutorial &&
 cvs -Q update -d -P . 
 
-mkdir tutorial &&
-cd tutorial &&
 cd $NICKLESRC/doc/tutorial &&
-cvs -Q update -d -P . 
-docbook2html -o $NICKLEWEB/tutorial tutorial.sgml 1>/dev/null
+cvs -q update -d -P . | egrep '^[UMP]' >/dev/null 2>&1
+if [ $? -eq 0 ] || $FORCE
+then
+	TUTDIR=$NICKLEWEB/tutorial
+	rm -rf $TUTDIR &&
+	mkdir $TUTDIR &&
+	docbook2html -o $TUTDIR tutorial.sgml 1>/dev/null
+	if [ $? -eq 0 ]
+	then
+		chgrp -R www-data $TUTDIR &&
+		chmod -R ug+w $TUTDIR
+	else
+		rm -rf $TUTDIR
+		echo "nickle tutorial update: docbook2html failure" >&2
+		exit 1
+	fi
+fi




More information about the Commit mailing list