Skip to content

Instantly share code, notes, and snippets.

@cwillsey06
Created September 14, 2023 15:29
Show Gist options
  • Select an option

  • Save cwillsey06/b6bb714b300bba223807d6a484e41198 to your computer and use it in GitHub Desktop.

Select an option

Save cwillsey06/b6bb714b300bba223807d6a484e41198 to your computer and use it in GitHub Desktop.
Pull current roblox dmg, then extract the app.
#!/bin/sh
# obtain the current client version string
VERSION="$(curl -fLs 'https://clientsettings.roblox.com/v2/client-version/MacPlayer' | grep -Eho 'version-.{16}')"
# test VERSION var, if zero, exit with a log
[ -z "$VERSION" ] \
&& printf '%s\n' 'Unable to pull current version string. The dependent service may be down, or your proxy denies connections to it.' \
&& exit 1
# download the latest binary dmg
curl -fLOs "https://setup.rbxcdn.com/mac/$VERSION-Roblox.dmg"
# mount the volume
hdiutil attach -quiet -nobrowse ./*-Roblox.dmg
# extract the .app from attached disk
# optional: extract to provided directory
cp -r /Volumes/RobloxPlayerInstaller/*.app "./$1"
# unmount the volume
hdiutil detach -quiet /Volumes/RobloxPlayerInstaller
# delete dmg file
rm -f ./*-Roblox.dmg
# success
printf '%s\n' 'done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment