Fixed printlog issue

This commit is contained in:
Sam Ess
2021-10-16 19:17:06 -04:00
parent c85a7a1fba
commit d402f46c3c
2 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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