Skip to main content
Question

Install the latest version of Brave Browser

  • April 30, 2020
  • 3 replies
  • 27 views

Forum|alt.badge.img+16

Modified a script that does the same thing for chrome. But this script will download and install the latest version of Brave directly from their web site

#!/bin/sh

dmgfile="Brave-Broswer.dmg"
volname="Brave Browser"
logfile="/Library/LogsBraveInstallScript.log"

url='https://brave-browser-downloads.s3.brave.com/latest/Brave-Browser.dmg'


/bin/echo "--" >> ${logfile}
/bin/echo "`date`: Downloading latest version." >> ${logfile}
/usr/bin/curl -s -o /tmp/${dmgfile} ${url}
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach /tmp/${dmgfile} -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
ditto -rsrc "/Volumes/${volname}/Brave Browser.app" "/Applications/Brave Browser.app"
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep "${volname}" | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm /tmp/"${dmgfile}"

exit 0

3 replies

bradsschroeder
Forum|alt.badge.img+4

@strayer Thanks for tagging this with Jamf Nation. I think this would be better off just tagged with patch management as that is the primary function. Please let me know if you disagree with the removal of the Jamf Nation tag.


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • February 9, 2023

Hey Adam,

 

I get a message when using the script above:

 

 

Have experienced this issue at all?


Forum|alt.badge.img+16
  • Author
  • Valued Contributor
  • 182 replies
  • February 9, 2023

Hey Adam,

 

I get a message when using the script above:

 

 

Have experienced this issue at all?


It's possible that with M1 architecture this is no longer downloading the correct version of the application? or there could be an OS compatibility issue.
I am no longer using this script my self I'm using Installomator for this purpose now. https://github.com/Installomator/Installomator