mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-02 08:25:02 -04:00
* fix relative symlink resolution issues (for homebrew)
This commit is contained in:
parent
397dd744df
commit
cbeb74f1f3
@ -1,8 +1,23 @@
|
||||
#!/bin/bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
SOURCE="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
PRG="${BASH_SOURCE[0]}"
|
||||
|
||||
APP_ROOT="$SOURCE/../.."
|
||||
# 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
|
||||
|
||||
# make it fully qualified
|
||||
WORKING_DIR=`pwd`
|
||||
PRG_DIR=`dirname "$PRG"`
|
||||
APP_ROOT=`cd "$PRG_DIR/../.." && pwd`
|
||||
|
||||
# restore original working dir
|
||||
cd "$WORKING_DIR"
|
||||
|
||||
java -Djava.awt.headless=true -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=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" -jar "$APP_ROOT"/Contents/Java/* "$@"
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
SOURCE="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
sudo ln -s -f "$SOURCE/filebot.sh" "/usr/bin/filebot"
|
Loading…
Reference in New Issue
Block a user