filebot/installer/appbundle/MacOS/filebot.sh

25 lines
856 B
Bash
Raw Normal View History

2015-06-05 06:34:29 +00: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 14:06:10 +00: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 "$@"