2011-01-05 20:32:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
# Make sure we have a terminal for the user to see and then run
|
|
|
|
|
# the real install script.
|
|
|
|
|
|
2011-02-02 22:01:24 +00:00
|
|
|
# Some systems don't correctly set the PWD when a script is double-clicked,
|
|
|
|
|
# so go ahead and figure out our path and make sure we are in that directory.
|
|
|
|
|
|
2011-02-08 22:23:44 +00:00
|
|
|
SAVED_PWD=$PWD
|
2011-02-02 22:01:24 +00:00
|
|
|
PKG_PATH=$(dirname $(readlink -f $0))
|
2011-02-08 22:23:44 +00:00
|
|
|
cd ${PKG_PATH}
|
2011-02-02 22:01:24 +00:00
|
|
|
|
2011-02-09 14:59:35 +00:00
|
|
|
if [ -z "$TERM" ] || [ "$TERM" = "dumb" ]; then
|
2011-02-09 16:24:20 +00:00
|
|
|
if which xterm > /dev/null; then
|
|
|
|
|
exec xterm -e ${PKG_PATH}/.stage2.run
|
|
|
|
|
elif which gnome-terminal > /dev/null; then
|
2011-02-08 22:23:44 +00:00
|
|
|
exec gnome-terminal -e ${PKG_PATH}/.stage2.run
|
2011-01-06 22:11:04 +00:00
|
|
|
elif which konsole > /dev/null; then
|
2011-02-08 22:23:44 +00:00
|
|
|
exec konsole -e ${PKG_PATH}/.stage2.run
|
2011-01-06 22:11:04 +00:00
|
|
|
fi
|
2011-01-05 20:32:14 +00:00
|
|
|
else
|
2011-02-08 22:23:44 +00:00
|
|
|
${PKG_PATH}/.stage2.run
|
2011-01-05 20:32:14 +00:00
|
|
|
fi
|
2011-02-02 22:01:24 +00:00
|
|
|
|
2011-02-08 22:23:44 +00:00
|
|
|
cd ${SAVED_PWD}
|