autoupdate FileBot

All your suggestions, requests and ideas for future development
Post Reply
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

autoupdate FileBot

Post 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?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: autoupdate FileBot

Post 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.
:idea: Please read the FAQ and How to Request Help.
User avatar
bonelifer
Power User
Posts: 81
Joined: 23 Mar 2013, 18:27

Re: autoupdate FileBot

Post 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
User avatar
bonelifer
Power User
Posts: 81
Joined: 23 Mar 2013, 18:27

Re: autoupdate FileBot

Post 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
Last edited by bonelifer on 28 Oct 2013, 13:57, edited 1 time in total.
Reason: Updated
User avatar
bonelifer
Power User
Posts: 81
Joined: 23 Mar 2013, 18:27

Re: autoupdate FileBot

Post 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
Last edited by bonelifer on 28 Oct 2013, 13:59, edited 1 time in total.
Reason: Updated
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: autoupdate FileBot

Post 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.
:idea: Please read the FAQ and How to Request Help.
User avatar
bonelifer
Power User
Posts: 81
Joined: 23 Mar 2013, 18:27

Re: autoupdate FileBot

Post by bonelifer »

Updated my two scripts to copy instead of moving.
User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: autoupdate FileBot

Post 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)
There can be only one Power² User
Post Reply