Skip to content

Instantly share code, notes, and snippets.

@Razikus
Created November 1, 2024 12:52
Show Gist options
  • Save Razikus/edb84c2fd90f2d928c0866bb2dd0853d to your computer and use it in GitHub Desktop.
Save Razikus/edb84c2fd90f2d928c0866bb2dd0853d to your computer and use it in GitHub Desktop.
#!/bin/sh
# check if ~/cache exists
if [ ! -d ./cache/https/game.havenandhearth.com/java/jogl/current/jar/ ]; then
echo "Cache doesn't exist, first try to run haven"
osascript -e 'display dialog "Please run Ender first before continuing." buttons {"OK"} with title "Haven Required" with icon caution'
exit 1
fi
curl -o jogl.7z https://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z
tar -xvf jogl.7z
rm jogl.7z
cp jogamp-all-platforms/jar/jogl-all-natives-macosx-universal.jar ./cache/https/game.havenandhearth.com/java/jogl/current/jar/
cp jogamp-all-platforms/jar/jogl-all.jar ./cache/https/game.havenandhearth.com/java/jogl/current/jar/
cp jogamp-all-platforms/jar/gluegen-rt.jar ./cache/https/game.havenandhearth.com/java/jogl/current/jar/
cp jogamp-all-platforms/jar/gluegen-rt-natives-macosx-universal.jar ./cache/https/game.havenandhearth.com/java/jogl/current/jar/
rm -r jogamp-all-platforms
osascript -e 'display dialog "Jogamp libraries have been updated. Run Haven now" buttons {"OK"} with title "Jogamp Updated" with icon note'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment