From 6a6d88c29ae91194c558aa0bbf3f3ee0438725e8 Mon Sep 17 00:00:00 2001 From: handa Date: Sat, 22 Oct 2005 00:02:54 +0000 Subject: [PATCH] *** empty log message *** --- Makefile.am | 2 +- utils/dbdata.awk | 3 +-- utils/dbdata.sh | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index b1a71ac..401add9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -224,7 +224,7 @@ doxyfile-man%.usr: doxyfile-man% data/exprog.txt: ${EXAMPLE_PROGS} utils/exprog.sh utils/exprog.sh ${EXAMPLE_PROGS} > $@ -data/dbdata.txt: ${DBDATA} ${DBIMAGE} @M17NDB@/mdb.dir utils/dbdata.awk +data/dbdata.txt: ${DBDATA} ${DBIMAGE} @M17NDB@/mdb.dir utils/dbdata.awk utils/dbdata.sh @AWK@ -f utils/dbdata.awk @M17NDB@/mdb.dir > $@ data/dbformat.txt: ${DBFORMAT} utils/dbformat.sh diff --git a/utils/dbdata.awk b/utils/dbdata.awk index 6adc3af..f8b31e8 100644 --- a/utils/dbdata.awk +++ b/utils/dbdata.awk @@ -1,5 +1,4 @@ BEGIN { - print "/***"; } @@ -9,7 +8,7 @@ BEGIN { FILE=substr($0, FROM, LEN); DIR=FILENAME; gsub("/[^/]*$", "", DIR) - system("sed -n '/^;;;/s/^;;; *//p' "DIR"/"FILE); + system("utils/dbdata.sh "DIR" "FILE); printf "\n"; } diff --git a/utils/dbdata.sh b/utils/dbdata.sh index 4dce3a0..0eea9a0 100755 --- a/utils/dbdata.sh +++ b/utils/dbdata.sh @@ -1,9 +1,23 @@ #!/bin/sh +cd $1 +set `ls $2` FILE=$1 while shift 1; do - sed -n -e "/^(input-method/s/(input-method \([^ ]*\) \([^)]*\))/
  • $FILE \1 \2/p" $FILE + sed -n -e '/^(input-method/s/(input-method \([^ ]*\) \([^ )]*\)\( \([^)]*\)\))/\1 \2 \4/p' $FILE | (read LANG NAME EXTRA + if test -z "NAME"; then + NAME=$EXTRA + fi + if test "$LANG" = "t"; then + LANG=generic + fi + if test "$NAME" = "nil"; then + echo "
  • $FILE (extra-name:$EXTRA, only for inclusion)" + else + echo "
  • $FILE (language:$LANG name:$NAME)" + fi + ) echo - sed -n -e '/^;;;/ s/^;;; *//p' -e '/^(description "/,/^")/ s/^(description "\|^")\|\\\|$//gp' $FILE + sed -n -e '/^;;;/ p' -e '/^(description "/,/^")/ s/^(description "\|^")\|\\\|$//gp' $FILE | sed -e '/^[^;]/ s/$/
    /' -e '/^;;;/ s/^;;; *//' FILE=$1 done -- 1.7.10.4