Files
Alte_Skripte/de.ing.Firefox_install.sh
2026-02-16 15:05:15 +01:00

37 lines
1.0 KiB
Bash

#!/bin/bash
##########################################################################
# Shellscript :
# Autor : Andreas Vogel, macenterprise gmbh,
##########################################################################
# 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