r62: Improved search paths for finding icons and applications to handle various
[rox-filer.git] / ROX-Filer / AppRun
blobc72217dd71334cd6e24bdcd1b61b8d01335bc662
1 #!/bin/bash
3 set -P
4 APP_DIR=${0%/*}
5 if [ "$APP_DIR" = "$0" ] ; then APP_DIR=. ; fi
6 APP_DIR=`cd $APP_DIR;pwd`; export APP_DIR
8 PLATFORM=`unset HOSTTYPE; unset OSTYPE; bash -c 'echo $OSTYPE-$HOSTTYPE'`
10 BIN=$APP_DIR/bin/$PLATFORM
12 if [ -x $BIN ] ; then
13 DEBUGGER=""
14 case $1 in
15 -d) shift; DEBUGGER=gdb;
16 esac
17 exec $DEBUGGER $BIN $*
18 else
19 echo "ERROR from $0:" >&2
20 echo "I cannot find an executable file for your host type ($PLATFORM)." >&2
21 echo "Look inside this application directory for a 'src' directory - if" >&2
22 echo "there is one then try running make inside it to create the executable." >&2