Advertisement
Tbruff13

My bad script

Mar 20th, 2011
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. 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'
  2. echo "Using $TMP as temp dir, $DEST as destination and $BIN as binary dir"
  3. 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"
  4. sudo 7z e -o"$TMP/rs_client" "$TMP/runescape.msi"
  5. sudo 7z e -o"$TMP/rs_client" "$TMP/rs_client/rslauncher.cab"
  6. sudo mkdir -p "$DEST" "$BIN"
  7. sudo chmod 777 -R "$TMP/rs_client"
  8. sudo mv "$TMP/rs_client/JagexAppletViewerJarFile."* "$DEST/jagexappletviewer.jar"
  9. sudo mkdir "$DEST/images"
  10. sudo mv "$TMP/rs_client/JagexAppletViewerPngFile" "$DEST/images/jagexappletviewer.png"
  11. echo -e "#\!/bin/sh\ncd \"$DEST\" && $RUN " > "$TMP/runescape"
  12. sudo mv "$TMP/runescape" "$BIN/runescape"
  13. 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"
  14. sudo mv "$TMP/runescape.desktop" /usr/share/applications/runescape.desktop
  15. sudo chmod 755 "$BIN/runescape"
  16. sudo chmod 755 /usr/share/applications/runescape.desktop
  17. sudo rm "$TMP" -r
  18. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement