Created
October 2, 2015 16:29
-
-
Save andykais/6e7eec9c835c8cbf46ef to your computer and use it in GitHub Desktop.
save images as rar file, then rename as .cbr
This file contains hidden or 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 | |
comicdir=$1 | |
if [ -d "$comicdir" ] | |
then | |
outname=$(echo $comicdir | sed -e 's/\///') | |
outname=$(echo $outname | sed -e 's/\ /_/g') | |
rarname=$outname'.rar' | |
cbrname=$outname'.cbr' | |
rar a "$rarname" "$comicdir" | |
mv $rarname $cbrname | |
echo $outname comic file is created | |
else | |
echo 'not a directory!' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment