Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- SCRIPTPATH=$( cd "$(dirname "$0")" ; pwd -P )
- function has_command()
- {
- command -v "$1" >/dev/null
- }
- function show_message()
- {
- style=$1
- shift
- if ! zenity "$style" --text="$*" 2>/dev/null; then
- case "$style" in
- --error)
- title=$"Error"
- ;;
- --warning)
- title=$"Warning"
- ;;
- *)
- title=$"Note"
- ;;
- esac
- # Save the prompt in a temporary file because it can have newlines in it
- tmpfile="$(mktemp || echo "/tmp/steam_message.txt")"
- echo -e "$*" >"$tmpfile"
- xterm -T "$title" -e "cat $tmpfile; echo -n 'Press enter to continue: '; read input" 2>/dev/null || \
- (echo "$title:"; cat "$tmpfile"; echo -n 'Press enter to continue: '; read input)
- rm -f "$tmpfile"
- fi
- }
- if has_command java; then
- #FIX for some VM's other then METACITY
- #save old value before unsetting
- oldXMODIFIERS=$XMOFIFIERS
- unset XMODIFIERS
- cd $SCRIPTPATH
- java -Djava.library.path=lib/native/ -Xms1024M -Xmx1024M -Xss2048k -jar lib/xaos.jar
- #If there were XMODIFIERS, set them again
- if [ ${#oldXMODIFIERS} -ge 1 ]; then
- echo "Setting XMODIFIERS to old value."
- export XMODIFIERS=$oldXMODIFIERS
- fi
- else
- show_message --error "Couldn't find java, please install it from openjdk.java.net"
- exit 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement