blob: 206550be59ff710214dea7004c047e189b19da0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/bash
# get the absolute path of the executable
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
# resolve symlinks
while [ -h "$SELF_PATH" ]; do
DIR=$(dirname -- "$SELF_PATH")
SYM=$(readlink -- "$SELF_PATH")
SELF_PATH=$(cd -- "$DIR" && cd -- $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
done
# Player folder
FIRENARWHAL_HOME=$(dirname -- "$SELF_PATH")
# get xulrunner
XULRUNNER=$(which xulrunner)
if [ ! $(which $XULRUNNER) ]; then XULRUNNER=$(which firefox); fi
if [ ! $(which $XULRUNNER) ]; then XULRUNNER=$(which /Applications/Firefox.app/Contents/MacOS/firefox); fi
# runner
if [ $(which $XULRUNNER) ]; then
RUNNER="$XULRUNNER -app $FIRENARWHAL_HOME/application.ini -repl $@"
$RUNNER
else
echo "Can't find nor xulrunner nor firefox on your system !!"
fi
|