mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-31 22:04:22 +01:00
@@ -1,5 +1,6 @@
|
|||||||
## v10
|
## v10
|
||||||
|
|
||||||
|
- 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
|
## v9
|
||||||
|
|||||||
@@ -228,8 +228,12 @@ getAppVersion() {
|
|||||||
else
|
else
|
||||||
applist=$(mdfind "kind:application $appName" -0 )
|
applist=$(mdfind "kind:application $appName" -0 )
|
||||||
fi
|
fi
|
||||||
if [[ -z applist ]]; then
|
if [[ -z $applist ]]; then
|
||||||
|
if [[ $SKIP_UNINSTALLED -eq 1 ]]; then
|
||||||
|
cleanupAndExit 0 "No previous app found, and SKIP_UNINSTALLED=1." REQ
|
||||||
|
else
|
||||||
printlog "No previous app found" DEBUG
|
printlog "No previous app found" DEBUG
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
printlog "App(s) found: ${applist}" DEBUG
|
printlog "App(s) found: ${applist}" DEBUG
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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