Last active
July 15, 2021 20:32
-
-
Save sekaiwish/b90c220e109188f4f6549c390ba0c8bf to your computer and use it in GitHub Desktop.
RuneLite Launcher
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/bash | |
latest=$(curl -s https://api.github.com/repos/runelite/runelite/tags | python -c "import sys, json; print(json.load(sys.stdin)[0]['name'])") | |
runelite=$HOME/.runelite | |
version=$HOME/.runelite/version | |
client=$HOME/.runelite/client | |
if [[ ! -d $runelite ]]; then | |
mkdir $runelite | |
fi | |
if [[ ! -f $version ]]; then | |
touch $version | |
fi | |
if [[ ! -d $client ]]; then | |
mkdir $client | |
fi | |
cd $client | |
if [[ ! $latest == $(cat $version) ]]; then | |
echo "New version of RuneLite available, downloading..." | |
rm -r ./* | |
wget -qc https://api.github.com/repos/runelite/runelite/tarball/$latest -O - | tar -xz | |
cd */runelite-client | |
echo "Compiling RuneLite..." | |
mvn -q install -DskipTests | |
echo $latest > $version | |
fi | |
java -ea -cp net.runelite.client.RuneLite -jar $client/*/runelite-client/target/client-*-shaded.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment