mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-15 05:10:56 +00:00
Compare commits
6 Commits
dev
...
Variable-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbb027399e | ||
|
|
f5db340589 | ||
|
|
31e376789f | ||
|
|
c049dc4a92 | ||
|
|
e5541fb97a | ||
|
|
4cee224d17 |
@@ -1,3 +1,7 @@
|
|||||||
|
## v10.0
|
||||||
|
|
||||||
|
- Introducing variable `SKIP_UNINSTALLED` that normally will be `0` and the script will run and install the software label if other conditions align with this. Use `SKIP_UNINSTALLED=1` to have the script stop if a current installation of the app is not found.
|
||||||
|
|
||||||
## v9.0.1
|
## v9.0.1
|
||||||
|
|
||||||
- improved logging levels throughout the script #408
|
- improved logging levels throughout the script #408
|
||||||
|
|||||||
@@ -242,8 +242,12 @@ getAppVersion() {
|
|||||||
# printlog "App(s) found: ${applist}" DEBUG
|
# printlog "App(s) found: ${applist}" DEBUG
|
||||||
# applist=$(mdfind "kind:application AND name:$appName" -0 )
|
# applist=$(mdfind "kind:application AND name:$appName" -0 )
|
||||||
fi
|
fi
|
||||||
if [[ -z applist ]]; then
|
if [[ -z $applist ]]; then
|
||||||
printlog "No previous app found" INFO
|
if [[ $SKIP_UNINSTALLED -eq 1 ]]; then
|
||||||
|
cleanupAndExit 0 "No previous app found, and SKIP_UNINSTALLED=1." REQ
|
||||||
|
else
|
||||||
|
printlog "No previous app found" WARN
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
printlog "App(s) found: ${applist}" INFO
|
printlog "App(s) found: ${applist}" INFO
|
||||||
fi
|
fi
|
||||||
@@ -265,7 +269,7 @@ getAppVersion() {
|
|||||||
if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then
|
if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then
|
||||||
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
|
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
|
||||||
if [[ $IGNORE_APP_STORE_APPS == "yes" ]]; then
|
if [[ $IGNORE_APP_STORE_APPS == "yes" ]]; then
|
||||||
printlog "Replacing App Store apps, no matter the version"
|
printlog "Replacing App Store apps, no matter the version" WARN
|
||||||
appversion=0
|
appversion=0
|
||||||
else
|
else
|
||||||
cleanupAndExit 1 "App previously installed from App Store, and we respect that" ERROR
|
cleanupAndExit 1 "App previously installed from App Store, and we respect that" ERROR
|
||||||
|
|||||||
@@ -110,6 +110,13 @@ INSTALL=""
|
|||||||
# if it is newer/different in version
|
# if it is newer/different in version
|
||||||
# - force Install even if it’s the same version
|
# - force Install even if it’s the same version
|
||||||
|
|
||||||
|
# skip if app is not currently installed
|
||||||
|
SKIP_UNINSTALLED=0
|
||||||
|
# options:
|
||||||
|
# - 0 Run normally and install the app if other conditions are met.
|
||||||
|
# - 1 If app is not currently installed we will not install anything.
|
||||||
|
# This is mostly done in the getAppVersion function, and if it cannot
|
||||||
|
# locate the app, the script will exit.
|
||||||
|
|
||||||
# Re-opening of closed app
|
# Re-opening of closed app
|
||||||
REOPEN="yes"
|
REOPEN="yes"
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ if [ -z "$appName" ]; then
|
|||||||
# when not given derive from name
|
# when not given derive from name
|
||||||
appName="$name.app"
|
appName="$name.app"
|
||||||
fi
|
fi
|
||||||
|
printlog "appName: $appName" INFO
|
||||||
|
|
||||||
if [ -z "$targetDir" ]; then
|
if [ -z "$targetDir" ]; then
|
||||||
case $type in
|
case $type in
|
||||||
|
|||||||
Reference in New Issue
Block a user