X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=utils%2Fdbdata.sh;h=51d88f8b0c8b68c81e4efce07b22d10355e01077;hb=2cb6096b0d1b5e2fe4ae6f3558eafdc6d43c5e81;hp=d3125fb28a5532f0005c94d22dbd65fb0ad7de54;hpb=064fd1eaad8494b7f61c0904329d3048690134fa;p=m17n%2Fm17n-docs.git diff --git a/utils/dbdata.sh b/utils/dbdata.sh index d3125fb..51d88f8 100755 --- a/utils/dbdata.sh +++ b/utils/dbdata.sh @@ -2,32 +2,60 @@ IMDOC=`pwd`/utils/imdoc -cd $1 -set `ls $2` -FILE=$1 -while shift 1; do +set `ls $1/$2` +while [ $# -ge 1 ] ; do + FILE=$1 IM=`grep '^(input-method' $FILE` if test -n "$IM"; then - sed -n -e '/^(input-method/s/(input-method \([^ ]*\) \([^ )]*\)\( \([^)]*\)\)*)/\1 \2 \4/p' $FILE | (read LANG NAME EXTRA + if grep -q '^;;;' $FILE; then + sed -n -e '/^(input-method/s/(input-method \([^ ]*\) \([^ )]*\)\( \([^)]*\)\)*)/\1 \2 \4/p' $FILE | (read LNG NAME EXTRA if test -z "NAME"; then NAME=$EXTRA fi - if test "$LANG" = "t"; then - LANG=generic + if test "$LNG" = "t"; then + LNG=generic fi if test "$NAME" = "nil"; then - echo "
" + echo "@endhtmlonly" + ) else - $IMDOC $FILE "$IM" + M17NDIR=/usr/share/m17n $IMDOC $FILE "$IM" fi else echo sed -n -e '/^;;;/ p' $FILE | sed -e '/^[^;]/ s/$/" + echo "@endhtmlonly" + sed -n -e '/^;;; *@/ s/;;; *\(.*\)/\1/p' \ + -e '/^;;; *[^ @]/ s,;;; *\(.*\),\1@n,p' $FILE + echo "@htmlonly" + echo "