Skip to content
Snippets Groups Projects
Commit 9813af12 authored by Sylvester Joosten's avatar Sylvester Joosten Committed by Sylvester Joosten
Browse files

allow scripts to be passed to eic-shell

parent 0721086a
No related branches found
No related tags found
1 merge request!109allow scripts to be passed to eic-shell
...@@ -194,7 +194,7 @@ PREFIX=$PREFIX ...@@ -194,7 +194,7 @@ PREFIX=$PREFIX
DISABLE_CVMFS_USAGE=${DISABLE_CVMFS_USAGE} DISABLE_CVMFS_USAGE=${DISABLE_CVMFS_USAGE}
function print_the_help { function print_the_help {
echo "USAGE: ./eic-shell [OPTIONS]" echo "USAGE: ./eic-shell [OPTIONS] [ -- COMMAND ]"
echo "OPTIONAL ARGUMENTS:" echo "OPTIONAL ARGUMENTS:"
echo " -u,--upgrade Upgrade the container to the latest version" echo " -u,--upgrade Upgrade the container to the latest version"
echo " -n,--no-cvmfs Disable check for local CVMFS when updating. (D: enabled)" echo " -n,--no-cvmfs Disable check for local CVMFS when updating. (D: enabled)"
...@@ -202,7 +202,11 @@ function print_the_help { ...@@ -202,7 +202,11 @@ function print_the_help {
echo "" echo ""
echo " Start the eic-shell containerized software environment." echo " Start the eic-shell containerized software environment."
echo "" echo ""
echo "EXAMPLE: ./eic-shell" echo "EXAMPLES: "
echo " - Start an interactive shell: ./eic-shell"
echo " - Upgrade the container: ./eic-shell --upgrade"
echo " - Execute a single command: ./eic-shell -- <COMMAND>"
echo ""
exit exit
} }
...@@ -223,6 +227,10 @@ while [ \$# -gt 0 ]; do ...@@ -223,6 +227,10 @@ while [ \$# -gt 0 ]; do
print_the_help print_the_help
exit 0 exit 0
;; ;;
--)
shift
break
;;
*) *)
echo "ERROR: unknown argument: \$key" echo "ERROR: unknown argument: \$key"
echo "use --help for more info" echo "use --help for more info"
...@@ -259,7 +267,7 @@ fi ...@@ -259,7 +267,7 @@ fi
export ATHENA_PREFIX=$PREFIX/local export ATHENA_PREFIX=$PREFIX/local
export SINGULARITY_BINDPATH=$BINDPATH export SINGULARITY_BINDPATH=$BINDPATH
$SINGULARITY exec $SIF eic-shell $SINGULARITY exec $SIF eic-shell \$@
EOF EOF
chmod +x eic-shell chmod +x eic-shell
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment