Print

Print


Commit in www-lcsim/build on MAIN
detectors-index.sh+20-131.4 -> 1.5
JM: improvements to detector index script

www-lcsim/build
detectors-index.sh 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- detectors-index.sh	16 Dec 2005 19:27:59 -0000	1.4
+++ detectors-index.sh	10 Apr 2008 21:02:11 -0000	1.5
@@ -4,23 +4,30 @@
 # Builds an index for detectors/ from detectors/taglist.txt .
 #
 
-if [ ! -e $tags ]; then
-  echo "ERROR: List of detector tags not found at $tags ."
-  exit 1
-fi
+#if [ ! -e $tags ]; then
+#	echo "ERROR: List of detector tags not found at $tags ."
+#	exit 1
+#fi
 
 # make work dir
 if [ ! -e ./tmp ]; then
-  mkdir ./tmp
+	mkdir ./tmp
 fi
 
-(
+if [ -z "$LCDETECTORS" ]; then
+	echo "LCDETECTORS environment variable is not set"
+  	exit 1
+fi
 
+(
   # checkout LCDetectors to work dir
-  cd tmp
-  export CVSROOT=:pserver:[log in to unmask]:/cvs/lcd
-  echo "Checking out LCDetectors ..."
-  cvs co LCDetectors &> /dev/null
+  #cd tmp
+  #export CVSROOT=:pserver:[log in to unmask]:/cvs/lcd
+  #echo "Checking out LCDetectors ..."
+  mkdir scratch
+  cd scratch
+
+  #cvs co LCDetectors &> /dev/null
 
   > ./detectors.inc
   > ./compact_all
@@ -28,10 +35,10 @@
 
   echo "<lccdd>" >> ./compact_all
 
-  echo "Putting all <info> tags into same file ..."
+  #echo "Putting all <info> tags into same file ..."
   # loop over compact descriptions and make a collection of info elements to process
-  for d in `cat ../detectors/taglist.txt`; do
-    xml sel -t -c /lccdd/info ./LCDetectors/detectors/${d}/compact.xml | grep -v DOCTYPE >> ./compact_all
+  for d in `cat $LCDETECTORS/detectors/taglist.txt`; do
+    xml sel -t -c /lccdd/info $LCDETECTORS/detectors/${d}/compact.xml | grep -v DOCTYPE >> ./compact_all
   done 
 
   echo "</lccdd>" >> ./compact_all
CVSspam 0.2.8