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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-02-2011, 12:55 AM   #1
mcqueary
eBook Junkie
mcqueary began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2011
Location: Aurora, CO
Device: Kindle, iPad
calibredb exit codes?

Hi folks!

I'm writing a shell script for some custom imports and it seems like calibredb always returns 0 (success) when I (e.g.) try to add a file that doesn't exist. Is this known behavior? Or does it only return >0 in specific situations?

example:

$ calibredb add /path/to/nonexistent/file.epub
/path/to/nonexistent/file.epub not found
Backing up metadata
Notifying calibre of the change
$ echo $?
0

Thanks!
mcqueary is offline   Reply With Quote
Old 01-02-2011, 11:56 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: 26,102
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
adding will raise non zero exit codes, but not for not found files, that's because the adder is recursive and just ignores missing/invalid files. If there is an error during an actual add, the exit code will be non zero.
kovidgoyal is online now   Reply With Quote
 
Enthusiast
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibredb update bug with 0.7.21? _Em Calibre 1 10-02-2010 04:20 PM
calibredb list --output-format=xml no longer supported Mekk Library Management 6 06-11-2010 08:13 AM
Calibredb add after ebook-convert fails spullar Calibre 5 03-04-2010 01:14 PM
Problems Using Calibredb Commands in a Batch File Cartaphilus Calibre 3 01-22-2010 07:18 PM
Command line calibredb set_metadata problem Nedan Calibre 1 02-27-2009 08:44 PM


All times are GMT -4. The time now is 02:01 AM.


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