From 5c7a5c0b2e7cd0bf23fd9a227c7c1f61c4753413 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 6 Nov 2017 18:30:41 -0700 Subject: [PATCH] turn on set +e around if blocks --- install.sh | 2 ++ installer/http-get.sh | 2 ++ installer/sudo-cmd.sh | 2 ++ 3 files changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 21ad5fe..abe1f33 100644 --- a/install.sh +++ b/install.sh @@ -96,12 +96,14 @@ popd # source ./installer/my-root.sh echo "Pre-installation to $my_app_dir complete, now installing to $my_root/ ..." +set +e if type -p tree >/dev/null 2>/dev/null; then #tree -I "node_modules|include|share" $my_app_dir tree -L 6 -I "include|share|npm" $my_app_dir else ls $my_app_dir fi +set -e source ./installer/my-user-my-group.sh echo "User $my_user Group $my_group" diff --git a/installer/http-get.sh b/installer/http-get.sh index 812ed7c..6e05247 100644 --- a/installer/http-get.sh +++ b/installer/http-get.sh @@ -13,6 +13,7 @@ _h_http_out="" detect_http_get() { + set +e if type -p curl >/dev/null 2>&1; then _h_http_get="curl" _h_http_opts="-fsSL" @@ -25,6 +26,7 @@ detect_http_get() echo "Aborted, could not find curl or wget" return 7 fi + set -e } http_get() diff --git a/installer/sudo-cmd.sh b/installer/sudo-cmd.sh index 9340092..b6b3ff8 100644 --- a/installer/sudo-cmd.sh +++ b/installer/sudo-cmd.sh @@ -1,5 +1,7 @@ # Not every platform has or needs sudo, gotta save them O(1)s... sudo_cmd="" +set +e if type -p sudo >/dev/null 2>/dev/null; then ((EUID)) && [[ -z "${ANDROID_ROOT-}" ]] && sudo_cmd="sudo" fi +set -e