From cf33dde725f7ea17353182d59be69bc424913541 Mon Sep 17 00:00:00 2001 From: "Deavon M. McCaffery" Date: Tue, 29 Dec 2020 05:09:18 +0000 Subject: [PATCH] fix: use posix-compliant source (dot) and exit codes --- bootstrap.sh | 2 +- src/sh/scripts/add-var | 2 +- src/sh/scripts/update-prompt | 2 +- template/bash_profile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index d146951..dae38b6 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -90,6 +90,6 @@ __am_prompt_update() "$PROMPT_INSTALL_TEMP/install.sh" $PROMPT_SHELL $PROMPT_INSTALL_TEMP } -trap 'echo; echo; echo "${CLR_WARN}prompt: terminating update...${CLR_CLEAR}"; exit -1;' INT +trap 'echo; echo; echo "${CLR_WARN}prompt: terminating update...${CLR_CLEAR}"; exit 1;' INT __am_prompt_update $@ diff --git a/src/sh/scripts/add-var b/src/sh/scripts/add-var index a402989..35b87a5 100755 --- a/src/sh/scripts/add-var +++ b/src/sh/scripts/add-var @@ -33,7 +33,7 @@ __am_prompt_add_var() { echo "add-var: adding varable: $VARIABLE" echo >> "$VAR_PATH" echo "$VARIABLE" >> "$VAR_PATH" - source "$VAR_PATH" + . "$VAR_PATH" } __am_prompt_add_var $@ diff --git a/src/sh/scripts/update-prompt b/src/sh/scripts/update-prompt index 58a4dec..a3d61d6 100755 --- a/src/sh/scripts/update-prompt +++ b/src/sh/scripts/update-prompt @@ -90,6 +90,6 @@ __am_prompt_update() . "$PROMPT_INSTALL_TEMP/install.sh" $PROMPT_SHELL $PROMPT_INSTALL_TEMP } -trap 'echo; echo; echo "${CLR_WARN}prompt: terminating update...${CLR_CLEAR}"; exit -1;' INT +trap 'echo; echo; echo "${CLR_WARN}prompt: terminating update...${CLR_CLEAR}"; exit 1;' INT __am_prompt_update $@ diff --git a/template/bash_profile b/template/bash_profile index eb63a9c..2d3c83d 100644 --- a/template/bash_profile +++ b/template/bash_profile @@ -4,5 +4,5 @@ if [ -f "$HOME/.bashrc" ]; then # load bash - source "$HOME/.bashrc" + . "$HOME/.bashrc" fi