Commit in SimDist/scripts on MAIN
install-libs.sh.in+64added 1.1
script to install all shared libraries from packages into single directory

SimDist/scripts
install-libs.sh.in added at 1.1
diff -N install-libs.sh.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ install-libs.sh.in	29 Jun 2011 21:38:22 -0000	1.1
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+#
+# Install the libraries for SimDist packages into a single directory.
+# The directory can be passed as the argument to this script.
+#
+# ./scripts/install-libs.sh [copyDir]
+#
+# If the directory is not specified, the script will try to copy the libs to ./lib within
+# the SimDist where the script is located.
+#
+# WARNING: Do NOT source or include this script.  It will fail!
+
+# name of script
+PRG="$0"
+
+# directory of script
+progname=`basename "$0"`
+
+# resolve relative symlinks
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`"/$link"
+  fi
+done
+
+# sim dir is one back from scripts
+SIM_HOME=`dirname "$PRG"`/..
+
+# make it fully qualified
+SIM_HOME=`cd "$SIM_HOME" && pwd`
+
+# Setup copy dir.
+if [ -z "${1}" ]; then
+  COPY_DIR=${SIM_HOME}/lib
+else
+  COPY_DIR=${1}
+fi
+
+if [ ! -d "${COPY_DIR}" ]; then
+  mkdir -p ${COPY_DIR}
+fi
+
+# Figure out library paths for deps based on relative SimDist path.
+CLHEP_LIB_DIR=${SIM_HOME}/packages/clhep/@CLHEP_VERSION@/lib
+G4_LIB_DIR=${SIM_HOME}/packages/geant4/@GEANT4_VERSION@/lib/@G4SYSTEM@
+GDML_LIB_DIR=${SIM_HOME}/packages/gdml/@GDML_VERSION@/CPPGDML/build/@G4SYSTEM@/lib
+XERCES_LIB_DIR=${SIM_HOME}/packages/xerces/@XERCES_VERSION@/lib
+LCIO_LIB_DIR=${SIM_HOME}/packages/lcio/@LCIO_VERSION@/lib
+LCDD_LIB_DIR=${SIM_HOME}/packages/lcdd/@LCDD_VERSION@/lib
+HEPPDT_LIB_DIR=${SIM_HOME}/packages/heppdt/@[log in to unmask]
+HEPPID_LIB_DIR=${SIM_HOME}/packages/heppdt/@[log in to unmask]
+SLIC_LIB_DIR=${SIM_HOME}/packages/slic/@SLIC_VERSION@/lib
+
+echo "Copying shared libraries to $COPY_DIR ..."
+
+cp ${CLHEP_LIB_DIR}/*.so ${G4_LIB_DIR}/*.so* ${GDML_LIB_DIR}/*.so* ${XERCES_LIB_DIR}/*.so* ${LCIO_LIB_DIR}/*.so* ${LCDD_LIB_DIR}/*.so* ${HEPPDT_LIB_DIR}/*.so* ${HEPPID_LIB_DIR}/*.so* ${SLIC_LIB_DIR}/*.so* ${COPY_DIR}
+
+echo "$COPY_DIR now contains these shared libraries ..."
+ls $COPY_DIR
CVSspam 0.2.8