Page 1 of 1

autoupdate FileBot

Posted: 30 Mar 2013, 19:31
by maortal
i was wondering is there a way i could auto fetch filebot updates?
since i want to install it on my htpc and i dont want to keep logging and redownload the program.. and replacing the jar file
is there a way to refetch the jar file and replace the current one?

Re: autoupdate FileBot

Posted: 02 Apr 2013, 13:12
by rednoah
You have a point, there'll probably never be auto-updates for the release packages, unless provided by native package management.

Though for the latest HEAD jar beta versions from here:
https://sourceforge.net/projects/filebo ... ebot/HEAD/

You can try this to sync over the latest jar like this:

Code: Select all

curl -L -O -z FileBot.jar http://sourceforge.net/projects/filebot/files/filebot/HEAD/FileBot.jar
If run this once a week it'll be fine. Though you these are all betas, once in a while there might be one that's inadvertently broken because of some changes I made.

Re: autoupdate FileBot

Posted: 25 Apr 2013, 02:32
by bonelifer
Here's a batch file for Windows users:

fbget.bat

Code: Select all

cd C:\progra~1\FileBot
del FileBot.jar
curl -L -O -z FileBot.jar http://sourceforge.net/projects/filebot/files/filebot/HEAD/FileBot.jar
Download CURL for Windows(search for "Win32 - Generic" or "Win64 - Generic"):
http://curl.haxx.se/download.html

Re: autoupdate FileBot

Posted: 26 Apr 2013, 22:17
by bonelifer
Update for the batch file above, this time it checks for a backup of Filebot.jar, if the back up doesn't exist it renames the current one then retrieves the latest HEAD release. If it does exist then it deletes it and renames the current file and then retrieves the HEAD release.

fbget.bat

Code: Select all

cd C:\progra~1\FileBot
@echo off
IF EXIST Filebot.jar.old. (
del Filebot.jar.old.
copy FileBot.jar Filebot.jar.old.
) ELSE (
copy FileBot.jar Filebot.jar.old.
)
cls
echo
curl -L -O -z FileBot.jar http://sourceforge.net/projects/filebot/files/filebot/HEAD/FileBot.jar

Re: autoupdate FileBot

Posted: 28 Oct 2013, 03:36
by bonelifer
Here's a bash script that does the same thing as the windows script for linux:

Code: Select all

#!/bin/sh

cd /usr/share/filebot/

# Check for the file.
if [ -s Filebot.jar.old ]; then
        # If backup already exist delete it before backing up current FileBot.jar.
sudo rm Filebot.jar.old
sudo cp FileBot.jar Filebot.jar.old
else
        # Move current FileBot.jar to backup.
        sudo cp FileBot.jar Filebot.jar.old
fi

clear
# Download Current SVN revision of FileBot.jar.
sudo curl -L -O -z FileBot.jar http://sourceforge.net/projects/filebot/files/filebot/HEAD/FileBot.jar

Re: autoupdate FileBot

Posted: 28 Oct 2013, 05:55
by rednoah
This already has all the auto-update functionality you need:

Code: Select all

curl -L -O -z FileBot.jar http://sourceforge.net/projects/filebot/files/filebot/HEAD/FileBot.jar
This option makes it sync the file:

Code: Select all

-z
If FileBot.jar was not updated it will only send one HTTP request, get back a Not-Modified response and not download anything. Deleting the jar before this call disabled the "auto" part of the update.

Re: autoupdate FileBot

Posted: 28 Oct 2013, 14:00
by bonelifer
Updated my two scripts to copy instead of moving.

Re: autoupdate FileBot

Posted: 03 Jan 2014, 22:24
by Ithiel
Thanks bonelifer :-)

I've created an updated Windows downloader/updater here:
http://www.filebot.net/forums/viewtopic ... 225&p=7428

(this one doesn't require 3rd party downloaders like curl or wget)