Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2014, 10:41 AM   #1
LeonGaultier
Junior Member
LeonGaultier will become famous soon enoughLeonGaultier will become famous soon enoughLeonGaultier will become famous soon enoughLeonGaultier will become famous soon enoughLeonGaultier will become famous soon enoughLeonGaultier will become famous soon enough
 
Posts: 6
Karma: 566
Join Date: Apr 2014
Device: Kindle
Calibre Autoupdater for Linux

Hi

I have wrote a small shell script for Linux which Calibre Updated automatically when a new version is available. Thought so now it is time to share the part with the world.

git clone https://code.google.com/p/calibre-autoupdate/


Regards
Leon
LeonGaultier is offline   Reply With Quote
Old 04-06-2014, 01:43 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,839
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Thank you for sharing with the calibre community. Now we have OSX, Windows and Linux covered by a user supplied auto-updater script.
DoctorOhh is offline   Reply With Quote
Old 04-06-2014, 08:52 PM   #3
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 5,981
Karma: 9379756
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
What is wrong with Kovid's one-liner?

There is a calibre-upgrade.sh here

Quote:
Originally Posted by eschwartz View Post
There is a new install command, so make sure to update calibre-upgrade.sh everyone!

(the old version has been kept up for backwards compatibility, but we wouldn't be in this thread if we were content with plebeian methodologies. )


Code:
#!/bin/bash

calibre-debug -c "import urllib as u; from calibre.constants import numeric_version; raise SystemExit(int(numeric_version  < (tuple(map(int, u.urlopen('http://calibre-ebook.com/downloads/latest_version').read().split('.'))))))"

UP_TO_DATE=$?

if [ $UP_TO_DATE = 0 ]; then
	echo "Calibre is up-to-date"
else
	calibre --shutdown-running-calibre
	killall calibre-server

	sudo -v; wget -nv -O- https://github.com/kovidgoyal/calibre/raw/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
fi
And we have more goodies, like calibre-uninstall, and an "isolated" updater.
This will check for an updated version, and then it is a simple matter of running calbre-upgrade.sh in a weekly cron job. It compares calibre --version to the website version, and calls Kovid's one-liner. Nice and simple. Why didn't we make a sticky for that anyway?
eschwartz is online now   Reply With Quote
Old 04-06-2014, 09:20 PM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,839
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by eschwartz View Post
Why didn't we make a sticky for that anyway?
If you had separated that info out from the 3 page thread it certainly could have been made a sticky. In case you missed it I'm clueless when it comes to Linux.

How about starting a thread with the Updater, calibre-uninstall, and an "isolated" updater you mentioned with an appropriate title and I'll be glad to give you the official reigns of the Linux sticky.
DoctorOhh is offline   Reply With Quote
Old 04-07-2014, 03:31 PM   #5
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 5,981
Karma: 9379756
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
Quote:
Originally Posted by DoctorOhh View Post
If you had separated that info out from the 3 page thread it certainly could have been made a sticky. In case you missed it I'm clueless when it comes to Linux.

How about starting a thread with the Updater, calibre-uninstall, and an "isolated" updater you mentioned with an appropriate title and I'll be glad to give you the official reigns of the Linux sticky.
Oh, I was reprimanding myself for not pursuing the point at the time, I kinda forgot.

I created a thread here: http://www.mobileread.com/forums/sho...d.php?t=237233, describing the process. Can you sticky it?
eschwartz is online now   Reply With Quote
Old 04-08-2014, 06:31 AM   #6
LeonGaultier
Junior Member
LeonGaultier will become famous soon enoughLeonGaultier will become famous soon enoughLeonGaultier will become famous soon enoughLeonGaultier will become famous soon enoughLeonGaultier will become famous soon enoughLeonGaultier will become famous soon enough
 
Posts: 6
Karma: 566
Join Date: Apr 2014
Device: Kindle
New Version 0.14

The Script is not only for update. You can install Calibre first time or deinstall it.

New Version is out v0.14
LeonGaultier is offline   Reply With Quote
Old 04-12-2014, 10:30 PM   #7
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 5,981
Karma: 9379756
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
Quote:
Originally Posted by LeonGaultier View Post
The Script is not only for update. You can install Calibre first time or deinstall it.

New Version is out v0.14
calibre has a bundled uninstaller, and the simple update script will upgrade from version=none, as well, since that also causes the version check to fail to return a up-to-date.

This just looks kind of complicated, when all you really need to do is run Kovid's installer with a cron job.

Unless there is some extra benefit I couldn't see? Your scripts are in German, so it was kind of difficult to follow the variable names and I couldn't read the comments. But it looked like you were duplicating Kovid's script and not much else.

Also, you were using sed and grep to find the current and latest versions somehow? It can be done simpler, as I demonstrated, using calibre-debug to report on itself, and using the page http://calibre-ebook.com/downloads/latest_version instead of parsing the download redirect.
eschwartz is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Autoupdater LeonGaultier Software 3 04-15-2014 06:32 AM
Solution: Calibre AutoUpdater [Auto-Updater] megamaniac Calibre 6 08-02-2013 09:47 PM
[Linux] Calibre on Linux isn't detecting any of my Android devices Amogh Harish Devices 9 10-31-2012 05:45 AM
Calibre Linux grueno_books Calibre 3 11-11-2010 12:09 PM


All times are GMT -4. The time now is 08:41 AM.


MobileRead.com is a privately owned, operated and funded community.