OSDN Git Service

74f3184e391cf9c2489dc519443287277b4ef37c
[nkf/nkf.git] / man / make_doc.sh
1 current=`pwd`
2 self_dir=`echo $0 | sed -e's/\/[^\/]*$//`
3 if [ -d $self_dir ]
4 then
5   echo cd $self_dir
6   cd $self_dir
7 fi
8 version=`perl -ne'if(/VERSION/o&&/(\d)\.(\d)(\d)/o){print"$1.$2.$3";exit}' < ../NKF.mod/NKF.pm`
9 echo $version
10 echo generate nkf.1.pm
11 perl -ne'$m=/^=end|(=begin)( COMMAND)?/?($2?2:$1?1:0):(($m!=1&&print),$m);' ../NKF.mod/NKF.pm > nkf.1.pm
12 echo generate nkf.1
13 pod2man --section=1 --release="nkf $version" --center=" " --name=nkf nkf.1.pm ../nkf.1
14
15 #pod2man --section=1 --release="nkf 2.x.x" --center=" " --name=nkf nkf.1.pm|nroff -man|more
16
17 echo generate nkf.1j
18 pod2man --section=1 --release="nkf $version" --center=" " --name=nkf nkf.1j.pm | nkf -jE > ../nkf.1j
19 echo generate nkf.doc
20 pod2text nkf.1j.pm > ../nkf.doc
21
22 #pod2man --section=1 --release="nkf 2.x.x" --center=" " --name=nkf nkf.1j.pm|jgroff -mandoc -T nippon|more -r
23 echo cd $current
24 cd $current