Tag : dmg

How to Install DMG Application via Shell Script

Sometimes we have to install a DMG application via shell script, here is mine:

#/bin/sh

# Cisco Meeting Installer
# Ray Qiu
# Nov 28, 2016

# Download & Extract Installation Files
cd /tmp
curl -LOk http://xxx.com/downloads/ciscomeeting.zip
sudo unzip -o ciscomeeting.zip

# Install Cisco Meeting
path=`hdiutil attach /tmp/ciscomeeting.dmg | grep Volumes | awk ‘{print $3}’`
cp -rf $path/*.app /Applications
hdiutil detach “$path”

# Remove files
sudo rm -f ciscomeeting.zip
sudo rm -f ciscomeeting.dmg