From 4a038e37008f3356b7e2a5e46c89fcaa72ab83e3 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Wed, 29 Apr 2020 17:03:36 +0200 Subject: [PATCH] first implementation with webex meetings --- Installomator.sh | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Installomator.sh b/Installomator.sh index 9759f44..8e23b49 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -431,6 +431,12 @@ case $identifier in updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" updateToolArguments=( --install --apps WDAV00 ) ;; + webexmeetings) + name="Cisco Webex Meetings" + type="pkgInDmg" + downloadURL="https://akamaicdn.webex.com/client/webexapp.dmg" + expectedTeamID="DE8Y96K9QP" + ;; # msupdate codes from: # https://docs.microsoft.com/en-us/deployoffice/mac/update-office-for-mac-using-msupdate @@ -596,7 +602,7 @@ installAppWithPath() { # $1: path to app to install in $targetDir } -installFromDMG() { +mountDMG() { # mount the dmg echo "Mounting $tmpDir/$archiveName" # always pipe 'Y\n' in case the dmg requires an agreement @@ -610,6 +616,10 @@ installFromDMG() { fi echo "Mounted: $dmgmount" +} + +installFromDMG() { + mountDMG installAppWithPath "$dmgmount/$appName" } @@ -658,6 +668,20 @@ installFromZIP() { installAppWithPath "$tmpDir/$appName" } +installPkgInDmg() { + mountDMG + # locate pkg in dmg + if [[ -z $pkgName ]]; then + pkgName="$name.pkg" + fi + + # it is now safe to overwrite archiveName for installFromPKG + archiveName="$dmgmount/$pkgName" + + # installFromPkgs + installFromPKG +} + runUpdateTool() { if [[ -x $updateTool ]]; then echo "running $updateTool $updateToolArguments" @@ -805,6 +829,9 @@ case $type in zip|tbz) installFromZIP ;; + pkgInDmg) + installPkgInDmg + ;; *) echo "Cannot handle type $type" cleanupAndExit 99