Quote:
Originally Posted by st_albert
Be careful with that. If you take the above commands literally, you are creating the epub in the same directory as "mimetype" (which directory is part of the epub itself), and you are zipping the epub into itself in the second line. try instead
|
Quote:
Originally Posted by Jellby
Just to be picky, the second command zips everything, which includes "mimetype" again, so it could be compressed instead of just stored.
|
Of course book.epub was meant to be a placeholder. But it is good to warn about both of these potential problems. Both can be taken care of by adding the -u switch to the second command line.
zip -0Xq book.epub mimetype
zip -Xur9D book.epub *
My man page (Mac OS X) says
Quote:
-u
--updateReplace (update) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive. For example:
zip -u stuff *
will add any new files in the current directory, and update any files which have been modified since the zip archive stuff.zip was last created/modified (note that zip will not try to pack stuff.zip into itself when you do this).
|