Chrome Auto update by script which will download and install

#!/bin/sh #################################################################################################### # # Google Chrome Installation Script # #################################################################################################### # # DESCRIPTION # # Automatically download and install Google Chrome # #################################################################################################### # # HISTORY # # Created by Pradeep Swain on 2021-01-17 # # # Added -nobrowse flag to hdiutil attach /tmp/$VendorDMG command line arguments # Shout out to Chad Brewer (cbrewer) on JAMFNation for this fix/update # https://jamfnation.jamfsoftware.com/viewProfile.html?userID=1685 # Google Chrome Installation script # Vendor supplied DMG file VendorDMG="googlechrome.dmg" # Download vendor supplied DMG file into /tmp/ curl https://dl.google.com/chrome/mac/stable/GGRO/$VendorDMG -o /tmp/$VendorDMG # Mount vendor supplied DMG File hdiutil attach /tmp/$VendorDMG -nobrowse #Delete Old VLC Applicatio sudo rm -rf /Applications/Google\ Chrome.app/ # Copy contents of vendor supplied DMG file to /Applications/ # Preserve all file attributes and ACLs cp -r /Volumes/Google\ Chrome/Google\ Chrome.app /Applications/ #Permission if [ -d /Applications/Google\ Chrome.app ]; then chown -R root:admin /Applications/Google\ Chrome.app chmod -R 775 /Applications/Google\ Chrome.app fi # Identify the correct mount point for the vendor supplied DMG file GoogleChromeDMG="$(hdiutil info | grep "/Volumes/Google Chrome" | awk '{ print $1 }')" # Unmount the vendor supplied DMG file hdiutil detach $GoogleChromeDMG # Remove the downloaded vendor supplied DMG file rm -f /tmp/$VendorDMG

Comments

Popular posts from this blog

Restore macOS Server from a Time Machine backup

JAMF Server Upgrade process

Creating a Custom Installer for Mac (PKG Package)