Skip to main content
Jamf Nation, hosted by Jamf, is a knowledgeable community of Apple-focused admins and Jamf users. Join us in person at the ninth annual Jamf Nation User Conference (JNUC) this November for three days of learning, laughter and IT love.

Install/update VLC

@dan.kubley this is a similar script to yours I wrote, but allows me to get the latest version.

Hope it helps


# script to update vlc
find /Volumes -type d -name *vlc* -maxdepth 1 -exec hdiutil detach -quiet {} \;
if [[ -e "/tmp/vlc.dmg" ]]; then
    rm "/tmp/vlc.dmg"

# download and mount VLC
appName=`curl -s | perl -pe 's/.*(vlc-.*dmg).*./$1/' | grep "vlc-" | tail -n1`
curl -Lo "/tmp/vlc.dmg" "$appURL" --silent
hdiutil attach "/tmp/vlc.dmg" -nobrowse -quiet

# Install VLC
appVol=`find /Volumes -type d -name *vlc* -maxdepth 1`
ditto -rsrc "$appVol/" "/Applications/"
chown -R root:wheel "/Applications/"
chmod -R 755 "/Applications/"
sleep 3
hdiutil detach "$appVol" -quiet
sleep 3
rm "/tmp/vlc.dmg"
sleep 1
open "/Applications/" &

exit 0
Like Comment
Order by:
SOLVED Posted: by mecklind

Works perfect, thank you!

SOLVED Posted: by MattP

This script works for me but it's also grabbing one version behind the latest release. It's currently installing 3.0.4 but if I manually go to the URL in the script it shows that is the latest.