Print

Print


Commit in LCDetectors/detectors on MAIN
make_detector_zip.sh+40added 1.1
JM: Add script to build a single detector zip by name.

LCDetectors/detectors
make_detector_zip.sh added at 1.1
diff -N make_detector_zip.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ make_detector_zip.sh	29 Aug 2006 19:17:22 -0000	1.1
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+#
+# Simple script to bundle a detector dir
+# as a zip file containing detector.properties
+# and compact.xml detector description.
+#
+
+if [ -z "$1" ]; then
+    echo "ERROR: Missing name of detector to build."
+    exit 1
+fi
+
+if [ ! -d "$1" ]; then
+    echo "ERROR: $1 is not a directory."
+fi
+
+d=$1
+
+echo "Processing $d ..."
+
+if [ -e "${d}/compact.xml" ]; then
+(
+    if [ -e "${d}.zip" ]; then rm -v ${d}.zip; fi
+    cd $d
+    rm -rf $d
+    for f in `find . -print | grep -v CVS`; do
+	echo "adding $f"
+	zip $d $f
+    done
+)
+else
+  echo "ERROR: $d has no compact.xml file."
+fi
+
+mv $d/$d.zip .
+
+ls -la $d.zip
+
+echo "Done with $d"
\ No newline at end of file
CVSspam 0.2.8