diff options
author | Braden Shepherdson | 2017-06-13 11:01:46 -0400 |
---|---|---|
committer | Braden Shepherdson | 2017-06-13 11:05:13 -0400 |
commit | e4a8e847fed8fef07fa8e9312319e808151bce1c (patch) | |
tree | a9aa5d87bc00f4970984adddb1ee02d796f8e64e /pharo64.sh | |
download | aur-e4a8e847fed8fef07fa8e9312319e808151bce1c.tar.gz |
First version - working Pharo64 6.0.499
Should coexist side-by-side with the original pharo package (currently
5.0 32-bit).
Diffstat (limited to 'pharo64.sh')
-rwxr-xr-x | pharo64.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pharo64.sh b/pharo64.sh new file mode 100755 index 000000000000..a4234ac55fec --- /dev/null +++ b/pharo64.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# path +DIR=`readlink -f $0` #resolve symlink +ROOT=`dirname $DIR` #obtain dir of the resolved path +LINUX="$ROOT/bin" +RESOURCES="$ROOT/shared" +ICONS="$ROOT/icons" + +# icon (note: gvfs-set-attribute is found in gvfs-bin on Ubuntu +# systems and it seems to require an absolute filename) +gvfs-set-attribute \ + "$0" \ + "metadata::custom-icon" \ + "file://$ICONS/Pharo.png" \ + 2> /dev/null + +# zenity is part of GNOME +image_count=`ls "$RESOURCES"/*.image 2>/dev/null |wc -l` +if [ "$1" == "" ]; then + if which zenity &>/dev/null && [ "$image_count" -ne 1 ]; then + image=`zenity --title 'Select an image' --file-selection --filename "$RESOURCES/" --file-filter '*.image' --file-filter '*'` + else + image="$RESOURCES/Pharo6.0.image" + fi +else + image=$* +fi + + +# execute +exec "$LINUX/pharo" \ + --plugins "$LINUX" \ + --encoding utf8 \ + -vm-display-X11 \ + $image |