IGNORE_APP_STORE_APPS

This commit is contained in:
Søren Theilgaard
2021-09-17 22:40:35 +02:00
parent 0c0977e61f
commit 2b0cb9dbc0
2 changed files with 19 additions and 7 deletions

View File

@@ -175,13 +175,12 @@ getAppVersion() {
printlog "found app at $installedAppPath, version $appversion"
# Is current app from App Store
if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then
printlog "Installed $appName is from App Store, use INSTALL=force to replace."
# INSTALL="force"
# Maybe we should exit instead
if [[ $INSTALL == "force" ]]; then
printlog "Force is used so continuing"
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
if [[ $IGNORE_APP_STORE_APPS == "yes" ]]; then
printlog "Replacing App Store apps, no matter the version"
appversion=0
else
cleanupAndExit 1 "App previously installed from App Store"
cleanupAndExit 1 "App previously installed from App Store, and we respect that"
fi
fi
else