[Blends-commit] [SCM] website branch, master, updated. 24f85a760eea815003a27980760dfa6a942e7086

Iain R. Learmonth irl at fsfe.org
Fri Dec 12 22:38:12 UTC 2014


The following commit has been merged in the master branch:
commit 24f85a760eea815003a27980760dfa6a942e7086
Author: Iain R. Learmonth <irl at fsfe.org>
Date:   Fri Dec 12 22:37:28 2014 +0000

    check-static-content: added check to see if git pulled new things

diff --git a/webtools/check-static-content b/webtools/check-static-content
index a3b9865..aca7d48 100755
--- a/webtools/check-static-content
+++ b/webtools/check-static-content
@@ -23,11 +23,24 @@ if [ "--help" = "$1" -o "-h" = "$1" ] ; then
 	exit 1
 fi
 
-cd `dirname $0`
+which git
+if [ $? -ne 0 ]; then
+	@echo "git executable could not be found"
+	exit 1
+fi
 
-needsupdate=0
+if [ ! -d /srv/blends.debian.org ]; then
+	@echo "/srv/blends.debian.org is not a directory"
+	exit 1
+fi
+
+OLD_REV=`git rev-parse --verify HEAD`
+cd /srv/blends.debian.org
+git pull --quiet 2>/dev/null
+NEW_REV=`git rev-parse --verify HEAD`
+
+if [ "$OLD_REV" -ne "$NEW_REV" ]; then
+	[ -x /usr/local/bin/static-update-component ] && \
+		/usr/local/bin/static-update-component blends.debian.org 2>&1 >/dev/null
+fi
 
-cd /srv/blends.debian.org/ && \
-  git pull --quiet 2>/dev/null &&
-    [ -x /usr/local/bin/static-update-component ] && \
-    /usr/local/bin/static-update-component blends.debian.org >/dev/null 2>/dev/null

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list