Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-21-2011, 05:37 AM   #1
hairybiker
Banned
hairybiker began at the beginning.
 
Posts: 82
Karma: 10
Join Date: Aug 2009
Device: Tolino Shine 3
(Linux) What am I doing wrong here?

I have set :-
Code:
export CALIBRE_INSTALL_DIR="/opt"
in my .bashrc as stated at the end of the install script:-
Quote:
You can automate future calibre installs by setting the environment variable CALIBRE_INSTALL_DIR to the directory you want calibre installed into.
But when I run the script I STILL have to press enter to accept the folder

It is def. set as a "set|grep CALIBRE" returns the correct value.
Should it be set as ' rather than " ?
hairybiker is offline   Reply With Quote
Old 12-21-2011, 07:03 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Most likely sudo on your system is stripping out the env var. Use a script, instead of putting it in .bashrc and launch the whole script with sudo.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-21-2011, 02:30 PM   #3
hairybiker
Banned
hairybiker began at the beginning.
 
Posts: 82
Karma: 10
Join Date: Aug 2009
Device: Tolino Shine 3
I tried :-
Quote:
#!/bin/bash
export CALIBRE_INSTALL_DIR="/opt"&& sudo python -c "import urllib2; exec urllib2.urlopen('http://status.calibre-ebook.com/linux_installer').read();main()"
but again it failed asking for the folder.

But as you say the sudo is stripping the export but I can't sudo export.
Will look at setting it globally.
hairybiker is offline   Reply With Quote
Old 12-21-2011, 02:35 PM   #4
hairybiker
Banned
hairybiker began at the beginning.
 
Posts: 82
Karma: 10
Join Date: Aug 2009
Device: Tolino Shine 3
WEIRD!
If i set the variable globally, it appears in the sudo bash. BUT my bash alias that calls the script still fails however if I enter the python command manually it works.
hairybiker is offline   Reply With Quote
Old 12-21-2011, 11:22 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You script needs to be

#!/bin/bash
export CALIBRE_INSTALL_DIR="/opt"&& python -c "import urllib2; exec urllib2.urlopen('http://status.calibre-ebook.com/linux_installer').read();main()"


Note the absence of sudo in the script itself. Then you run the script itself with sudo
kovidgoyal is offline   Reply With Quote
Advert
Old 12-22-2011, 04:44 AM   #6
hairybiker
Banned
hairybiker began at the beginning.
 
Posts: 82
Karma: 10
Join Date: Aug 2009
Device: Tolino Shine 3
Thanks that works perfectly.
hairybiker is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Linux: Wrong version number samy2 Calibre 9 06-19-2011 09:59 AM
Not sure what I'm doing wrong crich70 Conversion 18 04-05-2011 09:13 PM
The Robbery: A Short Story that goes wrong for all the wrong reasons brinlingfm Self-Promotions by Authors and Publishers 0 03-22-2011 08:20 AM
Dates wrong on scheduled news: what am I doing wrong? Rod Laird Calibre 5 11-05-2010 06:06 PM
I'm obviously doing something wrong. TheMooch Calibre 1 11-15-2009 04:40 PM


All times are GMT -4. The time now is 05:00 AM.


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