Created
September 14, 2023 15:29
-
-
Save cwillsey06/b6bb714b300bba223807d6a484e41198 to your computer and use it in GitHub Desktop.
Pull current roblox dmg, then extract the app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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