You can try replacing the URL in the script with: https://get.videolan.org/vlc/last/macosx/
edit; you may need to edit the script as it calls out n-1 and this directory only has the latest version
Hi i have ended up using this script below and its working well, did try that url in the first script would download but wouldnt mount the image file.
This one is working:
!/bin/bash
mkdir /tmp/downloads
cd /tmp/downloads
Installing VLC Player
CurrentVLC=$(curl "http://get.videolan.org/vlc/last/macosx/" | grep .dmg | grep -v webplugin | grep -v md5 | grep -v sha1 | grep -v sha256 | awk '{print $2}' | awk -F ">" '{print $2}' | tr -d "</a")
curl -L -o vlc.dmg http://get.videolan.org/vlc/last/macosx/$CurrentVLC
rm -rf /Applications/VLC.app
hdiutil mount -nobrowse vlc.dmg -mountpoint /Volumes/vlc
rsync -vaz /Volumes/vlc/VLC.app/ /Applications/VLC.app
sleep30
hdiutil unmount "/Volumes/vlc"
rm vlc.dmg
rm -rf /tmp/downloads*
See below for changes.
sleep 30 to allow the dmg to load completely.
rm - rf /Applications/VLC.app - which removes the Application before it is reloaded