Last active
December 4, 2020 08:40
-
-
Save pedrovgs/46ea88001ac7e23232a407a55f04a16c to your computer and use it in GitHub Desktop.
Manga Time!! Add these files to your path and from any folder execute mangaTime.sh or compressFiles.sh <FOLDER> to transform a folder with a set of images into a zip folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "Help : To compress file use argument with directory" | |
exit 0 | |
fi | |
filename="${1}.cbz" | |
if [ -e "$filename" ]; then | |
echo "WARNING: file exists: $filename" >&2 | |
else | |
echo "Compresing $@ into $filename" | |
cd "$@" | |
zip "$filename" * | |
mv "$filename" .. | |
cd .. | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in * | |
do | |
if [[ -d "$file" ]]; then | |
compressFiles.sh "$file" | |
fi | |
done | |
mkdir zips | |
mv *.cbz zips/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment