filebot/installer/portable/update-filebot.sh

34 lines
772 B
Bash
Raw Normal View History

#!/bin/sh
PRG="$0"
# resolve relative symlinks
while [ -h "$PRG" ] ; do
2015-06-29 12:04:34 +00:00
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"
2015-06-29 12:04:34 +00:00
# update core application files
SH_FILE="$APP_ROOT/filebot.sh"
JAR_FILE="$APP_ROOT/FileBot.jar"
2015-06-29 12:04:34 +00:00
2014-03-26 07:15:23 +00:00
echo "Update $JAR_FILE"
2015-06-29 12:04:34 +00:00
curl -L -o "$JAR_FILE" -z "$JAR_FILE" "https://downloads.sourceforge.net/project/filebot/filebot/HEAD/FileBot.jar"
echo "Update $SH_FILE"
2016-04-20 17:54:09 +00:00
curl -L -o "$SH_FILE" -z "$SH_FILE" "https://raw.githubusercontent.com/filebot/filebot/master/installer/portable/filebot.sh"