Last active
March 11, 2021 17:46
-
-
Save 00-matt/2041b98900a96b1d1a5c04c189a20caf 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/sh | |
set -e | |
set -u | |
CONFIG_DIR="$HOME/.config/runelite-${1:-main}" | |
RUNELITE_DIR="$HOME/src/runelite" | |
cd "$RUNELITE_DIR" | |
git fetch | |
CURRENT_VERSION=$(git describe) | |
LATEST_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) | |
printf 'Current: %s\nLatest: %s\n' "$CURRENT_VERSION" "$LATEST_VERSION" | |
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then | |
echo 'Up to date.' | |
else | |
echo 'Updating.' | |
git checkout $LATEST_VERSION | |
mvn -DskipTests -T1C clean package --projects runelite-client --auto-make | |
fi | |
JAR_NAME="client-$(echo "$LATEST_VERSION" | cut -d'-' -f3)-shaded.jar" | |
exec java \ | |
-ea \ | |
-Duser.home="$CONFIG_DIR" \ | |
-jar "$RUNELITE_DIR/runelite-client/target/$JAR_NAME" \ | |
--developer-mode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment