Created
May 18, 2014 01:15
-
-
Save kambara/8aca52da5cb65fb453b3 to your computer and use it in GitHub Desktop.
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/sh | |
cd $1 | |
ls -F | grep / | | |
while read dirname | |
do | |
dirname=`echo "$dirname" | sed -e 's/\///'` | |
echo ----------------------- | |
echo $dirname | |
if [ -d tmp ]; then | |
rm -rf tmp/* | |
else | |
mkdir tmp | |
fi | |
cp -r "${dirname}"/* tmp/ | |
rm tmp/Thumbs.db | |
convmv -r -f utf8 -t sjis --notest tmp/ | |
cd tmp | |
zip -r ../"${dirname}".zip * | |
cd .. | |
rm -rf tmp | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment