installerTool implemented

This commit is contained in:
Søren Theilgaard
2021-11-15 14:25:57 +01:00
parent 4aa7cd7793
commit 891dab08d4
7 changed files with 41 additions and 17 deletions

View File

@@ -342,7 +342,7 @@ installAppWithPath() { # $1: path to app to install in $targetDir
# versioncheck
# credit: Søren Theilgaard (@theilgaard)
appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey)
if [[ $appversion == $appNewVersion ]]; then
if [[ -n $appNewVersion && $appversion == $appNewVersion ]]; then
printlog "Downloaded version of $name is $appNewVersion, same as installed."
if [[ $INSTALL != "force" ]]; then
message="$name, version $appNewVersion, is the latest version."
@@ -428,11 +428,7 @@ mountDMG() {
installFromDMG() {
mountDMG
if [[ -z $CLIInstaller ]]; then
installAppWithPath "$dmgmount/$appName"
else
installAppWithPath "$dmgmount/$CLIInstaller"
fi
}
installFromPKG() {