diff options
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-x | init-tools.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/init-tools.sh b/init-tools.sh index 5ac2b44d7d..5f0fb640a9 100755 --- a/init-tools.sh +++ b/init-tools.sh @@ -17,7 +17,13 @@ __BUILD_TOOLS_SEMAPHORE="$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/init- if [ -e "$__BUILD_TOOLS_SEMAPHORE" ]; then echo "Tools are already initialized" - return #return instead of exit because this script is inlined in other scripts which we don't want to exit + if [ "$0" = "$BASH_SOURCE" ]; then + # not sourced + exit 0 + else + # sourced + return #return instead of exit because this script is inlined in other scripts which we don't want to exit + fi fi if [ -e "$__TOOLRUNTIME_DIR" ]; then rm -rf -- "$__TOOLRUNTIME_DIR"; fi |