r301: Added a new display style, 'Small, Full Info'.
[rox-filer/ma.git] / ROX-Filer / AppRun
blob24279ce8c9d2d50f11fe38412f9eb33bc667f5b9
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
35 exit 1