Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 02-07-2014, 05:21 PM   #31
aleyx
Addict
aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.
 
Posts: 250
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Bookeen Diva, Kobo Clara BW
It seems, reading the traceback, that there's something wrong in the way the linux_installer script tries to read your destination directory (/opt). Can you check its presence? I think it should be auto-created anyways, and the installer is sudoed, but well.

Also, can you check the /opt/calibre permissions and ownership?

N.
aleyx is offline   Reply With Quote
Old 02-07-2014, 05:35 PM   #32
eschwartz
Ex-Helpdesk Junkie
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.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
In case anyone is interested -- edge case

As there have been a couple times now that Kovid pushed an updated binary due to critical errors, I upgraded my update script to allow a "force" option, this keeps everything in one script.

It looks like this now:

Code:
#!/bin/bash

# Unset git development source
export CALIBRE_DEVELOP_FROM=
# by default, switch is off
force_upgrade=0

# Functions

usage()
{
	cat <<- _EOF_
		Usage: calibre-upgrade [OPTIONS]
		Upgrades calibre installation. Automaticaly checks if the current version is up to date.

		OPTIONS
		    -f, --force        Force an update. This is only useful if binaries
		                       were updated for a critical error :shrug:
_EOF_
}

do_upgrade()
{
	cd ~/bin/calibre-portable
	rm -rf ../calibre-portable/*
	wget -O - "http://status.calibre-ebook.com/dist/linux32" | tar xjf -
}

# Options
while [ "$1" != "" ]; do
	case $1 in
		-h|--help)		usage
						exit
						;;
		-f|--force)		shift
						force_upgrade=1
						;;
		*)				echo "calibre-upgrade: unrecognized option '$1'"
						echo "Try 'calibre-upgrade --help' for more information."
						exit 1
	esac
	shift
done

# Main

	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"

	if [ "$force_upgrade" = 1 ]; then
		echo ""
		echo "Forcing upgrade anyway -- are you sure you want to continue? [y/n]"
		read answer

		if [[ "$answer" = "y" || "$answer" = "yes" ]]; then
			do_upgrade
		else
			echo "Exiting..."
			exit 1
		fi
	fi
else
	do_upgrade
fi
Keep in mind I only use
Code:
cd ~/bin/calibre-portable
rm -rf ../calibre-portable/*
wget -O - "http://status.calibre-ebook.com/dist/linux32" | tar xjf -
to upgrade since I am not running as sudo -- I'm on a school computer ATM

Last edited by eschwartz; 02-28-2014 at 01:24 AM.
eschwartz is offline   Reply With Quote
Old 02-27-2014, 11:55 PM   #33
eschwartz
Ex-Helpdesk Junkie
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.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Exclamation

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.

Last edited by eschwartz; 02-28-2014 at 12:50 AM.
eschwartz is offline   Reply With Quote
Old 02-28-2014, 03:40 AM   #34
aleyx
Addict
aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.
 
Posts: 250
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Bookeen Diva, Kobo Clara BW
Quote:
Originally Posted by eschwartz View Post
(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. )
Verily, thou speaketh the truth.

Thanks for the update!

N.
aleyx is offline   Reply With Quote
Old 07-30-2014, 08:26 AM   #35
eschwartz
Ex-Helpdesk Junkie
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.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
New update! I created a sticky thread a while back describing the update script, here: https://www.mobileread.com/forums/sho...d.php?t=237233

It has now been updated with some things of mild importance (you might want to update ):

Quote:
Originally Posted by eschwartz View Post
I have created a github repository here: https://github.com/eli-schwartz/calibre-installer which contains an updated calibre-upgrade.sh as well as a script à la calibre's installer, which allows for a one-liner installation of the upgrade script. (Was that statement confusing enough? )

Run the following command in a terminal:

Code:
sudo -v && wget -nv -O- https://github.com/eli-schwartz/calibre-installer/raw/master/calibre-installer.sh | sudo sh -
It will:
  1. Download calibre-upgrade.sh to /usr/bin/calibre-upgrade.sh
  2. chmod it so it is executable.
  3. Add the cron job to root's crontab. (If cron is not installed*, this step will fail and report that to you.)

If anyone has any improvement suggestions, I'd be delighted to hear them.

* Because on my system it isn't -- who knew? Apparently, systemd is the wave of the future, and Arch Linux wants you to use systemd timers instead of crontabs. When I get around to it (or rather, figure out how they work ), I may write one of these timers. Meanwhile, if you are on Arch too, you can manually install a cron daemon or write your own stinking timer. (If anyone does, please share. </beg> )
Quote:
Originally Posted by eschwartz View Post
Things the new script fixes:
  • running "calibre --shutdown-running-calibre" as root doesn't seem particularly useful, unless you happen to be running calibre as root. So now it sudo's to each logged-in user to shutdown.
  • Makes sure you run as root.
  • Prettier messages when calibre is not yet installed. Instead of getting a lot of "bash: ****: command not found".

Last edited by eschwartz; 07-30-2014 at 08:36 AM.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
0.7 Linux Ubuntu ppa dicknskip Sigil 21 04-20-2013 04:29 AM
Official Calibre ereader app for mobile devices? mcandre Calibre 15 12-18-2012 03:27 PM
New official covers gers1978 Amazon Kindle 20 10-07-2011 11:15 AM
Firmware Update 3.0.2 is official mrzerga Amazon Kindle 33 10-23-2010 07:32 AM
It's Official BuddyBoy Sony Reader 9 11-09-2006 05:21 PM


All times are GMT -4. The time now is 06:00 PM.


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