SlacMCPrj/scripts
diff -u -r1.4 -r1.5
--- compact2lcdd.sh 1 Mar 2006 01:09:28 -0000 1.4
+++ compact2lcdd.sh 14 Nov 2006 23:53:40 -0000 1.5
@@ -1,10 +1,29 @@
#!/bin/sh
-if [ -z "$2" ]; then
- echo "Not enough CL args"
- echo "Usage: compact2lcdd compact.xml output.lcdd"
+if [ -z "$1" ]
+then
+ echo "ERROR: Not enough arguments."
+ echo "Usage: compact2lcdd compact.xml [output.lcdd]"
exit 1
+else
+ compact=$1
+fi
+
+if [ -z "$2" ]; then
+ lcdd=${1%.*}.lcdd
+else
+ lcdd=$2
fi
source setup-java.sh 1.5 &> /dev/null
-$PRJ_DIST/GeomConverter/pro/bin/GeomConverter -o lcdd $@
+
+echo "Creating LCDD file <$lcdd> from compact file <$compact> ..."
+
+$PRJ_DIST/GeomConverter/pro/bin/GeomConverter -o lcdd $compact $lcdd
+
+if [ -e "$lcdd" ]
+then
+ echo "Created LCDD file <$lcdd>."
+else
+ echo "Failed to create LCDD file <$lcdd>."
+fi