Skip to content

Instantly share code, notes, and snippets.

@idrisr
Created December 4, 2022 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idrisr/19483f3f0cb88b6723bfc5ae8d496a55 to your computer and use it in GitHub Desktop.
Save idrisr/19483f3f0cb88b6723bfc5ae8d496a55 to your computer and use it in GitHub Desktop.
#!/usr/bin/env zsh
NAME=${1:l}
pushd "$1"
pwd
setopt extendedglob
zip -X -0 "${NAME}" mimetype
zip -r -9 "${NAME}" *(/) (^mimetype)*
mv "${NAME}" ../
pwd
setopt noextendedglob
popd "$1"
pwd
@idrisr
Copy link
Author

idrisr commented Dec 4, 2022

Make an epub from a directory that is unzipped and used to be an epub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment