mirror of
https://github.com/lichess-org/lila.git
synced 2026-05-26 13:51:00 +00:00
lila.sh minor improvement
fix script sourced logic: return, not exit. Calling exit terminates the "parent" shell.
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user