www-lcsim/build
diff -u -r1.3 -r1.4
--- detectors-index.sh 4 Aug 2005 03:31:49 -0000 1.3
+++ detectors-index.sh 16 Dec 2005 19:27:59 -0000 1.4
@@ -4,48 +4,50 @@
# Builds an index for detectors/ from detectors/taglist.txt .
#
-# list of detectors tags created by ./build/detectors.sh
-tags=./detectors/taglist.txt
-
if [ ! -e $tags ]; then
echo "ERROR: List of detector tags not found at $tags ."
-else
+ exit 1
+fi
- # make work dir
- if [ ! -e ./tmp ]; then
- mkdir ./tmp
- fi
+# make work dir
+if [ ! -e ./tmp ]; then
+ mkdir ./tmp
+fi
- # checkout LCDetectors to work dir
- (
- cd tmp
- export CVSROOT=:pserver:[log in to unmask]:/cvs/lcd
- cvs co LCDetectors
- )
+(
- > ./tmp/detectors.inc
- > ./tmp/compact_all
+ # 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
+
+ > ./detectors.inc
+ > ./compact_all
+ > ./index.html
- echo "<lccdd>" >> ./tmp/compact_all
+ echo "<lccdd>" >> ./compact_all
+ 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 $tags`; do
- xml sel -t -c /lccdd/info ./tmp/LCDetectors/detectors/${d}/compact.xml | grep -v DOCTYPE >> ./tmp/compact_all
-
+ for d in `cat ../detectors/taglist.txt`; do
+ xml sel -t -c /lccdd/info ./LCDetectors/detectors/${d}/compact.xml | grep -v DOCTYPE >> ./compact_all
done
- echo "</lccdd>" >> ./tmp/compact_all
+ echo "</lccdd>" >> ./compact_all
+ echo "Creating index.html ..."
# make the index page using XSL processor with stylesheet
- xml tr --omit-decl xsl/detectors.xsl ./tmp/compact_all >> ./tmp/index.html
+ xml tr --omit-decl ../xsl/detectors.xsl ./compact_all >> ./index.html
- # tidy up the output HTML file ... and SU!
- tidy -raw -m ./tmp/index.html &> /dev/null
+ # tidy up the output HTML file
+ tidy -raw -m ./index.html &> /dev/null
# copy the index to detectors/
- cp ./tmp/index.html ./detectors
+ cp ./index.html ../detectors
+)
- # remove work dir
- rm -rf ./tmp
+# remove work dir
+rm -rf ./tmp
-fi
+echo "DONE"
www-lcsim/build
diff -u -r1.5 -r1.6
--- detectors.sh 6 Aug 2005 00:11:48 -0000 1.5
+++ detectors.sh 16 Dec 2005 19:27:59 -0000 1.6
@@ -7,14 +7,15 @@
fi
cvs co LCDetectors
-
(
cd LCDetectors/detectors
./convertAll.sh
./makeZips.sh
rm -rf ../../detectors/*.zip
- cp */*.zip ../../detectors
cp taglist.txt ../../detectors
+ cp */*.zip ../../detectors
+ cp --parent ./*/*.lcdd ../../detectors
+ cp --parent ./*/compact.xml ../../detectors
)
rm -rf LCDetectors