diff --git a/scripts/singularity_cmd b/scripts/singularity_cmd index ff19e703..9246727c 100755 --- a/scripts/singularity_cmd +++ b/scripts/singularity_cmd @@ -31,8 +31,6 @@ # THE SOFTWARE. # -set -eu - function info() { : # echo -e "I: " "$@" >&2 } @@ -72,6 +70,13 @@ function readlink_f() { readlink -f "$1" 2> /dev/null || python -c 'import sys, os ; print(os.path.realpath(sys.argv[1]))' "$1" } +if [ "$#" = 0 ]; then + echo "Using as a library. Run with 'exec' or 'run' command and options." + exit 0 +fi + +set -eu + info "PWD=$PWD" thisfile=$(readlink_f "$0")