1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-07 01:45:01 -05:00
filebot/installer/appbundle/MacOS/filebot.sh

25 lines
856 B
Bash
Raw Normal View History

2015-06-05 02:34:29 -04:00
#!/bin/sh
PRG="$0"
# resolve relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
# get canonical path
WORKING_DIR=`pwd`
PRG_DIR=`dirname "$PRG"`
APP_ROOT=`cd "$PRG_DIR/../.." && pwd`
# restore original working dir
cd "$WORKING_DIR"
# start filebot
2016-06-14 10:06:10 -04:00
/usr/libexec/java_home --failfast --version "1.8+" --exec java -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=true -Dapple.awt.UIElement=true -Djna.nounpack=true -Dapplication.deployment=app -Djna.library.path="$APP_ROOT/Contents/MacOS" -Djava.library.path="$APP_ROOT/Contents/MacOS" -Dnet.filebot.AcoustID.fpcalc="$APP_ROOT/Contents/MacOS/fpcalc" $JAVA_OPTS -jar "$APP_ROOT"/Contents/Java/*.jar "$@"