r262: Added a check in the dnd code that the requested type is valid
[rox-filer.git] / ROX-Filer / AppRun
blob007d170481cc6e742828f0f80c0bc76708f87c38
1 #!/bin/sh
3 PROG=ROX-Filer
5 APP_DIR=`dirname $0`
6 APP_DIR=`cd $APP_DIR;pwd`; export APP_DIR
8 PLATFORM=`uname -s`-`uname -m`
10 DEBUGGER=""
11 case $1 in
12 --debug) shift ; DEBUGGER=gdb ;;
13 --compile)
14 if [ ! -d $APP_DIR/src ] ; then
15 echo "ERROR from $0:" >&2
16 echo "Cannot compile - source code is missing!" >&2
17 exit 1
19 echo "Compiling $APP_DIR... please wait..." >&2
20 rm -f $APP_DIR/src/config.cache
21 cd $APP_DIR/src && ./configure --bindir=$APP_DIR/$PLATFORM \
22 && make clean && make && echo Done >&2 && exit 0
23 echo Compile failed >&2
24 exit 1
25 esac
27 BIN=$APP_DIR/$PLATFORM/$PROG
29 if [ -x $BIN ] ; then
30 exec $DEBUGGER $BIN "$@"
31 else
32 echo "ERROR from $0:" >&2
33 echo "I cannot find an executable file for your host type ($PLATFORM)." >&2
34 echo "Try using the --compile option." >&2