View Single Post
Old 02-25-2014, 03:14 PM   #15
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: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Because I'm an idiot and I forgot to make the while and if loops start...

Here's the real code:

Code:
if [ "$1" != "" ]; then
	while [ "$1" != "" ]; do
		ebook-edit "$1"
		shift
	done
	echo "if-loop"
else
	ebook-edit
fi
I actually tried this on my Ubuntu box this time.

It works, but only starts the next book once you close the first one. Fortunately, calibre has a --detach parameter, so:

Code:
if [ "$1" != "" ]; then
	while [ "$1" != "" ]; do
		ebook-edit --detach "$1"
		shift
	done
else
	ebook-edit
fi
This works for me. My previous code didn't work for me any more than it worked for you.

Last edited by eschwartz; 02-25-2014 at 03:23 PM.
eschwartz is offline   Reply With Quote