1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-25 17:28:51 -05:00
filebot/installer/qpkg/shared/bin/filebot.sh

36 lines
1.2 KiB
Bash
Raw Normal View History

2018-07-04 11:15:07 -04:00
#!/bin/sh
CONF="/etc/config/qpkg.conf"
QPKG_NAME="filebot"
QPKG_ROOT=$(/sbin/getcfg $QPKG_NAME Install_Path -f $CONF)
2018-07-04 11:15:07 -04:00
# make sure required environment variables are set
if [ -z "$USER" ]; then
export USER=`whoami`
fi
2018-08-15 15:53:45 -04:00
# add package lib folder to library path
PACKAGE_LIBRARY_PATH="$QPKG_ROOT/lib/$(uname -m)"
# add fpcalc to the $PATH by default
export PATH="$PATH:$PACKAGE_LIBRARY_PATH"
2018-07-04 11:15:07 -04:00
# force JVM language and encoding settings
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# choose archive extractor / media characteristics parser
ARCHIVE_EXTRACTOR="ApacheVFS"
MEDIA_PARSER="ffprobe"
2018-07-04 11:15:07 -04:00
# choose ffprobe executable
FFPROBE="/mnt/ext/opt/medialibrary/bin/ffprobe"
# select application data folder
APP_DATA="$QPKG_ROOT/data/$USER"
2018-08-15 15:53:45 -04:00
LIBRARY_PATH="$PACKAGE_LIBRARY_PATH:$LD_LIBRARY_PATH"
2018-07-04 11:15:07 -04:00
# start filebot
java -Dapplication.deployment=qpkg -Dnet.filebot.license="$QPKG_ROOT/data/.license" -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.media.ffprobe="$FFPROBE" -Dnet.filebot.Archive.extractor="$ARCHIVE_EXTRACTOR" -Djava.awt.headless=true @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$QPKG_ROOT/jar/filebot.jar" "$@"