Last active
August 29, 2015 13:56
-
-
Save papettoTV/8909115 to your computer and use it in GitHub Desktop.
epub3生成スクリプト
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 | |
# epub3生成スクリプト | |
# epub3ファイルを展開して修正後、再度epub3にパッケージングするためのスクリプト | |
# | |
# 対象のフォルダがある階層に移動して、スクリプト配置して実行 | |
# epub作成するフォルダ名を引数に指定 | |
# | |
# ex) | |
# ./make_epub.sh target_folder_name | |
# 結果、target_folder_name.epubが生成 | |
if [ $# -ne 1 ]; then | |
echo "args not found." | |
exit | |
fi | |
fname=$1 | |
if [ ! -e $fname ]; then | |
echo "$fname dir not found." | |
exit | |
fi | |
#main script | |
cd $fname | |
zip -0 -X ../$fname.epub mimetype | |
zip -9 -r ../$fname.epub META-INF OEBPS | |
#実行と同時にファイル開きたい場合 | |
#open ../$fname.epub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment