* fix nested relative symlink issues in the portable scripts as well
* portable startup scripts now are /bin/sh compatible
This commit is contained in:
parent
94c9a55b37
commit
a8bf338570
|
@ -20,4 +20,5 @@ 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,9 +1,27 @@
|
|||
#!/bin/bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
#!/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
|
||||
|
||||
# make it fully qualified
|
||||
WORKING_DIR=`pwd`
|
||||
PRG_DIR=`dirname "$PRG"`
|
||||
APP_ROOT=`cd "$PRG_DIR" && pwd`
|
||||
|
||||
# restore original working dir
|
||||
cd "$WORKING_DIR"
|
||||
|
||||
|
||||
# force JVM language and encoding settings
|
||||
export LANG=en_US.utf8
|
||||
|
||||
java -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dfile.encoding=UTF-8 -Djava.net.useSystemProxies=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=portable -Dapplication.analytics=true -Dapplication.warmup=false -Dnet.filebot.AcoustID.fpcalc=fpcalc "-Dapplication.dir=$dir_bin" "-Djava.io.tmpdir=$dir_bin/temp" "-Duser.home=$dir_bin" "-Djna.library.path=$dir_bin" "-Djava.library.path=$dir_bin" -Djava.util.prefs.PreferencesFactory=net.filebot.util.prefs.FilePreferencesFactory "-Dnet.filebot.util.prefs.file=$dir_bin/prefs.properties" -jar "$dir_bin/FileBot.jar" "$@"
|
||||
java -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dfile.encoding=UTF-8 -Djava.net.useSystemProxies=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=portable -Dapplication.analytics=true -Dapplication.warmup=false -Dnet.filebot.AcoustID.fpcalc=fpcalc "-Dapplication.dir=$APP_ROOT" "-Djava.io.tmpdir=$APP_ROOT/temp" "-Duser.home=$APP_ROOT" "-Djna.library.path=$APP_ROOT" "-Djava.library.path=$APP_ROOT" -Djava.util.prefs.PreferencesFactory=net.filebot.util.prefs.FilePreferencesFactory "-Dnet.filebot.util.prefs.file=$APP_ROOT/prefs.properties" -jar "$APP_ROOT/FileBot.jar" "$@"
|
|
@ -1,8 +1,26 @@
|
|||
#!/bin/bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
INSTALL_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
#!/bin/sh
|
||||
PRG="$0"
|
||||
|
||||
JAR_FILE="$INSTALL_DIR/FileBot.jar"
|
||||
# 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"
|
||||
|
||||
|
||||
JAR_FILE="$APP_ROOT/FileBot.jar"
|
||||
echo "Update $JAR_FILE"
|
||||
curl -L -o "$JAR_FILE" -z "$JAR_FILE" "http://sourceforge.net/projects/filebot/files/filebot/HEAD/FileBot.jar"
|
Loading…
Reference in New Issue