r835 - trunk/scripts

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Mon Aug 23 15:55:53 PDT 2004


Author: lizardo
Date: 2004-08-23 16:55:52 -0600 (Mon, 23 Aug 2004)
New Revision: 835

Modified:
   trunk/scripts/update-website.sh
Log:
update-website.sh: Added external lock file checking


Modified: trunk/scripts/update-website.sh
===================================================================
--- trunk/scripts/update-website.sh	2004-08-21 07:08:02 UTC (rev 834)
+++ trunk/scripts/update-website.sh	2004-08-23 22:55:52 UTC (rev 835)
@@ -1,14 +1,23 @@
 #!/bin/bash
 #set -x
 
+# Check for lock files from external scripts that touch TARGETDIR
+
+for lock in render-blfs-{book,edguide}-in-progress render-lfs-book-in-progress; do
+	while [ -f "/tmp/$lock" ]; do
+		echo "/tmp/$lock external lock file present, sleeping for 10 secs and trying again"
+		sleep 10
+	done
+done
+
 ##########################################################
 # Ensure there's only 1 instance of this script running  #
 
 LOCKFILE="/tmp/update-website-in-progress"
 
 while [ -f $LOCKFILE ]; do
-        echo "Lock file present, sleeping for 5 secs and trying again"
-        sleep 5
+	echo "Lock file present, sleeping for 5 secs and trying again"
+	sleep 5
 done
 
 touch $LOCKFILE




More information about the website mailing list