Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export TMP="$(mktemp -d --tmpdir runescape.XXXXXXXXXXXXXX)" DEST="/usr/local/share/runescape" BIN="/usr/local/bin" RUN=$'/usr/bin/java -Djava.class.path=jagexappletviewer.jar -Dcom.jagex.config=\x68\x74\x74\x70://\x77\x77\x77.runescape.\x63\x6f\x6d/k=3/l=en/jav_config\x2e\x77\x73 jagexappletviewer /runescape/images'
- echo "Using $TMP as temp dir, $DEST as destination and $BIN as binary dir"
- sudo wget $'\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x72\x75\x6e\x65\x73\x63\x61\x70\x65\x2e\x63\x6f\x6d\x2f\x64\x6f\x77\x6e\x6c\x6f\x61\x64\x73\x2f\x72\x75\x6e\x65\x73\x63\x61\x70\x65\x2e\x6d\x73\x69\x3f\x32\x31\x30\x36\x30\x34' -O "$TMP/runescape.msi"
- sudo 7z e -o"$TMP/rs_client" "$TMP/runescape.msi"
- sudo 7z e -o"$TMP/rs_client" "$TMP/rs_client/rslauncher.cab"
- sudo mkdir -p "$DEST" "$BIN"
- sudo chmod 777 -R "$TMP/rs_client"
- sudo mv "$TMP/rs_client/JagexAppletViewerJarFile."* "$DEST/jagexappletviewer.jar"
- sudo mkdir "$DEST/images"
- sudo mv "$TMP/rs_client/JagexAppletViewerPngFile" "$DEST/images/jagexappletviewer.png"
- echo -e "#\!/bin/sh\ncd \"$DEST\" && $RUN " > "$TMP/runescape"
- sudo mv "$TMP/runescape" "$BIN/runescape"
- echo -e "[Desktop Entry]\nName=RuneScape\nComment=Start RuneScape\nType=Application\nExec=$RUN\nStartupNotify=true\nTerminal=false\nCategories=Game;\nPath=$DEST\nIcon=$DEST/images/jagexappletviewer.png" > "$TMP/runescape.desktop"
- sudo mv "$TMP/runescape.desktop" /usr/share/applications/runescape.desktop
- sudo chmod 755 "$BIN/runescape"
- sudo chmod 755 /usr/share/applications/runescape.desktop
- sudo rm "$TMP" -r
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement