mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-17 14:55:09 -05:00
a8bf338570
* portable startup scripts now are /bin/sh compatible
26 lines
562 B
Bash
26 lines
562 B
Bash
#!/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"
|
|
|
|
|
|
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" |