[Blends-commit] [SCM] website branch, master, updated. 084762e4a122c4ec19a2f2ed27daea7cb3d2597c
Andreas Tille
tille at debian.org
Tue Sep 17 11:34:59 UTC 2013
The following commit has been merged in the master branch:
commit 084762e4a122c4ec19a2f2ed27daea7cb3d2597c
Author: Andreas Tille <tille at debian.org>
Date: Tue Sep 17 13:38:38 2013 +0200
Add script to trigger update of web sentinel for a specific Blend
diff --git a/misc/tools/blends_websentinel_update b/misc/tools/blends_websentinel_update
new file mode 100755
index 0000000..c3d3d95
--- /dev/null
+++ b/misc/tools/blends_websentinel_update
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+usage () {
+ cat <<EOT
+Usage: $0 [options] <blend>
+
+Description: Update web sentinel parts on alioth.debian.org
+
+Options:
+ -t|--tasks tasks pages (default)
+ -b|--bugs bugs pages
+ -r|--thermometer thermometer
+EOT
+}
+
+do_update () {
+ ssh "$HOST" "cd /srv/home/groups/blends/webtools; ./$1.py ${BLEND}"
+ rsync -a ${HOST}:/srv/home/groups/blends/webtools/logs/${BLEND}$2.* .
+}
+
+if [ $# -lt 1 ] ; then
+ usage
+ exit 1
+fi
+
+# per default create tasks pages
+dotasks='yes'
+HOST=alioth.debian.org
+
+while echo "$1" | grep -q ^- ; do
+ case "$1" in
+ "-t"|"--tasks")
+ dotasks='yes'
+ ;;
+ "-b"|"--bugs")
+ dobugs='yes'
+ ;;
+ "-r"|"--thermometer")
+ dothermometer='yes'
+ ;;
+ "-h"|"--host")
+ shift
+ HOST=$1
+ if [ "$HOST" = "" ] ; then
+ echo "$0: --host option requires parameter"
+ usage
+ exit 1
+ fi
+ ;;
+ *)
+ echo "$0: Unknown option $1."
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+BLEND="$1"
+
+if [ "$BLEND" = "" ] ; then
+ echo "$0: Missing <blend> parameter."
+ usage
+ exit 1
+fi
+
+#echo HOST = $HOST
+#echo dotasks = $dotasks
+#echo dobugs = $dobugs
+#echo dothermometer = $dothermometer
+#echo BLEND = $BLEND
+
+if [ "$dotasks" = "yes" ] ; then
+ do_update tasks ""
+fi
+
+if [ "$dobugs" = "yes" ] ; then
+ do_update bugs "_bugs"
+fi
+
+if [ "$dothermometer" = "yes" ] ; then
+ do_update thermometer "_thermometer"
+fi
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list