Skip to content

Instantly share code, notes, and snippets.

@kazuph
Created January 23, 2014 08:21
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 kazuph/8574863 to your computer and use it in GitHub Desktop.
Save kazuph/8574863 to your computer and use it in GitHub Desktop.
macでwindows用に文字コードを変換したパスワード付きのzipを生成する(かも
#!/usr/bin/env bash -eu
DIR=$1
echo "${DIR}を圧縮します。"
cp -rp ${DIR} ${DIR}_org
convmv -f utf8 --nfd -t utf8 --nfc -r --notest ${DIR}/*
convmv -f utf8 -t cp932 -r --notest ${DIR}/*
zip -9 -r ${DIR}.zip ${DIR}
zipcloak ${DIR}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment