Skip to content

Commit

Permalink
Merge pull request #223 from JeffersonLab/aaust_launch_container
Browse files Browse the repository at this point in the history
initial version of launch script with singularity support
  • Loading branch information
aaust authored May 2, 2024
2 parents d2b19d0 + c32ff3c commit d9fd771
Show file tree
Hide file tree
Showing 2 changed files with 468 additions and 0 deletions.
50 changes: 50 additions & 0 deletions launch_scripts/launch/gluexrunscript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash

if [ -d /group ]; then
echo "I am running in singularity."
else
echo "Something went wrong with setting up singularity! Abort."
exit 9
fi

VERSION=version.xml

CMDLINE_ARGS=""
# prepare command line arguments for evaluation
#for arg in "$@"; do
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-v|--version)
VERSION="$2"
shift # past argument
shift # past value
;;
-s|--sqlite)
SQLITE=true
shift # past argument
;;
*)
CMDLINE_ARGS="${CMDLINE_ARGS} $1"
shift # past argument
;;
esac
done

if [ -e /group/halld/www/halldweb/html/halld_versions/"$VERSION" ] ; then
echo "source /group/halld/Software/build_scripts/gluex_env_jlab.sh /group/halld/www/halldweb/html/halld_versions/"$VERSION
source /group/halld/Software/build_scripts/gluex_env_jlab.sh /group/halld/www/halldweb/html/halld_versions/$VERSION
else
echo $VERSION "does not exist! Abort."
exit 9
fi

if [ "$SQLITE" = true ] ; then
export JANA_CALIB_URL=sqlite:///$PWD/ccdb.sqlite
export CCDB_CONNECTION=sqlite:///$PWD/ccdb.sqlite
fi

printenv

echo $CMDLINE_ARGS
$CMDLINE_ARGS
Loading

0 comments on commit d9fd771

Please sign in to comment.