2011-01-31 09:48:34 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Make sure we have a terminal for the user to see and then run
|
|
|
|
# the real install script.
|
|
|
|
|
2011-02-25 17:05:15 -05: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.
|
|
|
|
|
|
|
|
SAVED_PWD=$PWD
|
2011-05-27 15:46:28 -04:00
|
|
|
PKG_PATH=$(dirname "$(readlink -f "$0")")
|
|
|
|
cd "${PKG_PATH}"
|
2011-02-25 17:05:15 -05:00
|
|
|
|
|
|
|
if [ -z "$TERM" ] || [ "$TERM" = "dumb" ]; then
|
2011-01-31 09:48:34 -05:00
|
|
|
if which xterm > /dev/null; then
|
2011-05-27 15:46:28 -04:00
|
|
|
exec xterm -e "${PKG_PATH}/.stage2.run"
|
2011-01-31 09:48:34 -05:00
|
|
|
elif which gnome-terminal > /dev/null; then
|
2011-05-27 15:46:28 -04:00
|
|
|
exec gnome-terminal -e "${PKG_PATH}/.stage2.run"
|
2011-01-31 09:48:34 -05:00
|
|
|
elif which konsole > /dev/null; then
|
2011-05-27 15:46:28 -04:00
|
|
|
exec konsole -e "${PKG_PATH}/.stage2.run"
|
2011-01-31 09:48:34 -05:00
|
|
|
fi
|
|
|
|
else
|
2011-05-27 15:46:28 -04:00
|
|
|
"${PKG_PATH}/.stage2.run"
|
2011-01-31 09:48:34 -05:00
|
|
|
fi
|
2011-02-25 17:05:15 -05:00
|
|
|
|
2011-05-27 15:46:28 -04:00
|
|
|
cd "${SAVED_PWD}"
|