-
Notifications
You must be signed in to change notification settings - Fork 2
/
installFirefox.sh
32 lines (28 loc) · 902 Bytes
/
installFirefox.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# Connor Sanders June 2018
# Assuming Hard Drive name is Macintosh HD
# Downloads and silently latest installer from Firefox site
dmgName="Firefox.dmg"
VolumeName="Firefox"
targetDrive="/Volumes/Macintosh HD"
downloadURL="https://download.mozilla.org/?product=firefox-latest-ssl&os=osx&lang=en-US"
appName="Firefox.app"
# Downloading File
echo "Downloading DMG File..."
curl -s -L -o "/tmp/$dmgName" "$downloadURL"
### Below commands installs DMG in silent mode ###
# Mounts DMG File
echo "Mounting DMG FIle..."
hdiutil mount /tmp/$dmgName -nobrowse -quiet
# Installs pkg contained inside DMG
echo "Installing DMG..."
cp -r /Volumes/"${VolumeName}"/"${appName}" /Applications/Firefox.app
# Unmount DMG
echo "Unmounting DMG..."
hdiutil unmount /Volumes/"${VolumeName}"
sleep 5
# Deletes tmp file
echo "Deleting DMG File"
rm /tmp/$dmgName
echo "Install Complete."
exit 0