Skip to content

Instantly share code, notes, and snippets.

@mo-han
Created June 23, 2019 13:31
Show Gist options
  • Save mo-han/0a3057b3d1a9b0c5f9ab97d1436a1843 to your computer and use it in GitHub Desktop.
Save mo-han/0a3057b3d1a9b0c5f9ab97d1436a1843 to your computer and use it in GitHub Desktop.
dir2cbz.sh
#!/bin/bash
for i in "$@"; do
if test -d "$i"; then
pushd "$i/.."
folder=$(basename "$i")
echo cbz: $folder
zip -q -0 -r "$folder.cbz" "$folder"
rm -r "$folder"
popd
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment