]> git.donarmstrong.com Git - flightcrew.git/blob - src/FlightCrew-gui/resources/bash/flightcrew-gui.sh
Imported Upstream version 0.7.2+dfsg
[flightcrew.git] / src / FlightCrew-gui / resources / bash / flightcrew-gui.sh
1 #!/bin/sh
2
3 # Entry point for FlightCrew-gui on Unix systems.
4 # Adds the directory the FlightCrew-gui executable is located
5 # in to the LD_LIBRARY_PATH so the custom Qt libs
6 # are recognized and loaded.
7
8 appname=`basename $0 | sed s,\.sh$,,`
9
10 dirname=`dirname $0`
11 tmp="${dirname#?}"
12
13 if [ "${dirname%$tmp}" != "/" ]; then
14 dirname=$PWD/$dirname
15 fi
16 LD_LIBRARY_PATH=$dirname
17 export LD_LIBRARY_PATH
18 #if no agruments are passed then call just FlightCrew-gui program; else pass arguments.
19 if [$* == ""]
20 then
21 $dirname/$appname 
22 else
23 #argument may not be pass correctly without qoutation marks.
24 $dirname/$appname "$*"
25 fi