lila.sh minor improvement

fix script sourced logic: return, not exit. Calling exit
terminates the "parent" shell.
This commit is contained in:
Isaac Levy
2025-12-03 11:14:50 -05:00
parent de4189fee3
commit 4a104b4132
+5 -2
View File
@@ -7,11 +7,14 @@
# Then in the sbt console:
# run
if [[ "${BASH_SOURCE[0]}" != "$0" ]]; then
>&2 echo "Fatal: lila.sh should be run, not sourced!"
return 1
fi
WARN() { >&2 printf '%s\n' "[warning] $*"; }
ABORT() { >&2 printf '%s\n' "[FATAL] $*"; exit 1; }
[[ "${BASH_SOURCE[0]}" == "$0" ]] || ABORT "should not be sourced!"
cd "$(dirname -- "$0")" # set cwd
cat << 'BANNER'