diff --git a/fragments/functions.sh b/fragments/functions.sh index 9201db4..9ec7ebe 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -366,7 +366,8 @@ installAppWithPath() { # $1: path to app to install in $targetDir # skip install for DEBUG 2 if [ "$DEBUG" -eq 2 ]; then - cleanupAndExit 0 "DEBUG mode 2 enabled, exiting" + printlog "DEBUG mode 2 enabled, exiting" + cleanupAndExit 0 fi # remove existing application @@ -469,7 +470,8 @@ installFromPKG() { # skip install for DEBUG 2 if [ "$DEBUG" -eq 2 ]; then - cleanupAndExit 0 "DEBUG 2 enabled, exiting" + printlog "DEBUG mode 2 enabled, exiting" + cleanupAndExit 0 fi # install pkg diff --git a/fragments/main.sh b/fragments/main.sh index e54097f..79e5685 100644 --- a/fragments/main.sh +++ b/fragments/main.sh @@ -6,7 +6,7 @@ esac # MARK: check for root -if [ "$(whoami)" != "root" || "$DEBUG" -eq 2 ]; then +if [[ "$(whoami)" != "root" && "$DEBUG" -ne 2 ]]; then # not running as root cleanupAndExit 6 "not running as root, exiting" fi