2 # -*- coding: utf-8; -*-
3 # $1: target directory (usr/latex, ja/latex, or dev/latex)
6 USR_JA_DEV=`dirname $1`
7 cp styles/m17n-lib.sty $1
10 if [ $USR_JA_DEV = "ja" ] ; then
12 if [ -d /usr/local/teTeX/bin ] ; then
13 PATH=/usr/local/teTeX/bin:$PATH
15 echo '\\appendix' > app.tex
16 sed -n -e '/コンパイル/,/include{m17nDBFormat}/ p' \
17 -e '/Tutorial for writing/,/include{GFDL}/ p' \
18 -e '/printindex/,$ p' < refman.tex >> app.tex
19 sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \
21 -e '/コンパイル/,/include{GFDL}/ d' \
22 -e '/chapter{ファイル}/,$ d' < refman.tex > m17n-lib.tex
23 cat app.tex >> m17n-lib.tex
29 *.tex) mv "$f" tmp; iconv -f utf-8 -t euc-jp < "tmp/$f" > "$f";;
30 *.sty) mv "$f" tmp; iconv -f utf-8 -t euc-jp < "tmp/$f" > "$f";;
34 elif [ $USR_JA_DEV = "dev" ] ; then
35 sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \
36 -e '/The m17n Library Module Index/,/pages/ d' \
37 -e '/The m17n Library File Documentation/,/textprop_8c/ d' \
38 -e '/The m17n Library Directory Documentation/,/dir_000001/ d' \
39 -e 's/The m17n Library Page Documentation/Appendix/' \
40 < refman.tex > m17n-lib.tex
42 echo '\\appendix' > app.tex
43 sed -n -e '/Print compile/,/include{GFDL}/ p' \
44 -e '/printindex/,$ p' < refman.tex >> app.tex
45 sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \
46 -e '/Print compile/,/include{GFDL}/ d' \
47 -e '/chapter{File Documentation}/,$ d' < refman.tex > m17n-lib.tex
48 cat app.tex >> m17n-lib.tex
51 makeindex m17n-lib.idx