From a1a9f4f1b9f837d71cbe871925437bd7fd2db7ec Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 15 May 2011 18:31:34 +0200 Subject: smalltalk pacman added --- .../Contents/Linux-i686/bin/squeak | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100755 pacman-smalltalk/Squeak 4.1 All-in-One.app/Contents/Linux-i686/bin/squeak (limited to 'pacman-smalltalk/Squeak 4.1 All-in-One.app/Contents/Linux-i686/bin/squeak') diff --git a/pacman-smalltalk/Squeak 4.1 All-in-One.app/Contents/Linux-i686/bin/squeak b/pacman-smalltalk/Squeak 4.1 All-in-One.app/Contents/Linux-i686/bin/squeak new file mode 100755 index 0000000..aa67545 --- /dev/null +++ b/pacman-smalltalk/Squeak 4.1 All-in-One.app/Contents/Linux-i686/bin/squeak @@ -0,0 +1,95 @@ +#!/bin/sh +# +# Launch squeakvm from the command line or a menu script, with a good +# plugin path, text encodings and pulseaudio kludge +# +# Last edited: 2010-04-10 20:04:32 by piumarta on ubuntu + +PATH=/usr/bin:/bin + +realpath () { + path="$1" + while test -L "${path}"; do + dir=`dirname "${path}"` + dir=`cd "${dir}" && pwd -P` + path=`basename "${path}"` + path=`ls -l "${dir}/${path}" | sed 's,.* -> ,,'` + path="${dir}/${path}" + done + if test -d "${path}"; then + (cd "${path}" && pwd -P) + else + dir=`dirname "${path}"` + file=`basename "${path}"` + (cd "${dir}" && echo "`pwd -P`/${file}") + fi +} + +bindir=`realpath "${0}"` +bindir=`dirname "${bindir}"` +prefix=`dirname "${bindir}"` +libdir="${prefix}/lib/squeak" +plgdir="${libdir}/4.0.3-2202" +useoss="true" +vm="squeakvm" +plugins="" +wrapper="" + +for opt in $*; do + case ${opt} in + -vm-sound*) useoss="false";; + -vm) case "$2" in sound*) useoss="false"; esac;; + esac +done + +# find the vm and set the plugin path + +if test -x "${plgdir}/${vm}"; then # bin/squeak -> lib/squeak/x.y-z/squeakvm + vm="${plgdir}/${vm}" + plugins="${plgdir}" +elif test -x "${bindir}/${vm}"; then # bld/squeak -> bld/squeakvm + vm="${bindir}/${vm}" + plugins="${bindir}/%n" +elif test -x `which ${vm}`; then + vm=`which ${vm}` + plugins="" +else + echo "cannot find ${vm}" >&2 + exit 1 +fi + +# command-line overrides environment, so communicate anything we decide here via the environment + +if test -z "${SQUEAK_PATHENC}"; then SQUEAK_PATHENC="UTF-8"; export SQUEAK_PATHENC; fi +if test -z "${SQUEAK_ENCODING}"; then SQUEAK_ENCODING="UTF-8"; export SQUEAK_ENCODING; fi + +if test -z "${SQUEAK_PLUGINS}"; then + if test -n "${plugins}"; then + SQUEAK_PLUGINS="${plugins}" + export SQUEAK_PLUGINS + fi +fi + +# deal with pulseaudio if it is running + +if test -z "${SQUEAK_VM}"; then + if ${useoss}; then + if pulseaudio --check 2>/dev/null; then + if padsp true 2>/dev/null; then + wrapper="padsp" + SQUEAK_VM="sound-OSS" + export SQUEAK_VM + fi + fi + fi +fi + +# fix broken locales + +if test -z "$LC_ALL"; then + LC_ALL="$LANG" + export LC_ALL +fi + +# run the vm +exec ${wrapper} "${vm}" "$@" -- cgit v1.2.3