Just to be picky, the second command zips everything, which includes "mimetype" again, so it could be compressed instead of just stored. To exclude mimetype:
zip -Xr9D ../book.epub * -x mimetype
My standard script is:
Code:
FILE="Book Title.epub"
rm -f "$FILE"
zip -X0 "$FILE" mimetype
zip -X9Dr "$FILE" META-INF OEBPS
I make sure I remove the .epub file first (otherwise old files are not removed from it), and my ePUBs have always the same structure (just the "mimetype" file, the "META-INF" directory, and everything else inside an "OEBPS" directory).