Print

Print


Commit in LCDetectors/detectors on MAIN
update_detectors.sh+5added 1.1
update_detector.sh+29added 1.1
+34
2 added files
JM: Add scripts to check if WWW detector zip files are up to date with local LCDetectors copies.

LCDetectors/detectors
update_detectors.sh added at 1.1
diff -N update_detectors.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ update_detectors.sh	29 Aug 2006 19:31:53 -0000	1.1
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+for d in $(cat taglist.txt); do
+  ./update_detector.sh $d
+done

LCDetectors/detectors
update_detector.sh added at 1.1
diff -N update_detector.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ update_detector.sh	29 Aug 2006 19:31:53 -0000	1.1
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+if [ -z "$PRJ_WWW" ]; then
+    echo "ERROR: Set PRJ_WWW to lcsim WWW dir."
+    exit 1
+fi
+
+if [ -z "$1" ]; then
+    echo "ERROR: Missing name of detector."
+    exit 1
+fi
+
+d=$1
+
+if [ ! -e "$d.zip" ]; then
+    echo "ERROR: $d.zip does not exist in this directory."
+fi
+
+z=$d.zip
+
+chk_local=$(md5sum $z | awk '{print $1}')
+chk_www=$(md5sum $PRJ_WWW/detectors/$z | awk '{print $1'})
+
+if [[ $chk_local != $chk_www ]]; then
+  cp $z $PRJ_WWW/detectors
+  #echo "$d needs update."
+else
+  echo "$PRJ_WWW/detectors/$z is already up-to-date."
+fi
CVSspam 0.2.8