OSDN Git Service

Fix: -Z1 and -Z2 doesn't include -Z0. [nkf-forum#41992]
[nkf/nkf.git] / man / make_doc.sh
index 3fd3620..74f3184 100755 (executable)
@@ -1,13 +1,24 @@
-echo nkf.1.pm
+current=`pwd`
+self_dir=`echo $0 | sed -e's/\/[^\/]*$//`
+if [ -d $self_dir ]
+then
+  echo cd $self_dir
+  cd $self_dir
+fi
+version=`perl -ne'if(/VERSION/o&&/(\d)\.(\d)(\d)/o){print"$1.$2.$3";exit}' < ../NKF.mod/NKF.pm`
+echo $version
+echo generate nkf.1.pm
 perl -ne'$m=/^=end|(=begin)( COMMAND)?/?($2?2:$1?1:0):(($m!=1&&print),$m);' ../NKF.mod/NKF.pm > nkf.1.pm
-echo nkf.1
-pod2man --section=1 --release="nkf 2.0.7" --center=" " --name=nkf nkf.1.pm ../nkf.1
+echo generate nkf.1
+pod2man --section=1 --release="nkf $version" --center=" " --name=nkf nkf.1.pm ../nkf.1
 
 #pod2man --section=1 --release="nkf 2.x.x" --center=" " --name=nkf nkf.1.pm|nroff -man|more
 
-echo nkf.1j
-pod2man --section=1 --release="nkf 2.0.7" --center=" " --name=nkf nkf.1j.pm | nkf -jE > ../nkf.1j
-echo nkf.doc
+echo generate nkf.1j
+pod2man --section=1 --release="nkf $version" --center=" " --name=nkf nkf.1j.pm | nkf -jE > ../nkf.1j
+echo generate nkf.doc
 pod2text nkf.1j.pm > ../nkf.doc
 
 #pod2man --section=1 --release="nkf 2.x.x" --center=" " --name=nkf nkf.1j.pm|jgroff -mandoc -T nippon|more -r
+echo cd $current
+cd $current