Code cleanup
[gregoa/zavai.git] / src / update-polygen-info
index eaaf94f63b5079b0fac71ad9e2328c8ec6b262c9..0b44c4498b14bec73d71fe17480b5c5756e88148 100755 (executable)
@@ -8,7 +8,23 @@ cd /usr/share/polygen
 find . -name "*.grm" | sort | while read NAME
 do
        TITLE=`polygen -info $NAME | grep ^title: | head -1 | sed -re 's/^[^:]+: *//'`
+       if [ "`polygen $NAME | head -n 1 | cut -c 1`" == '<' ]
+       then
+               T2="html"
+       else
+               T2="text"
+       fi
+
+       if [ "`polygen -X 10 $NAME | wc -l`" == "10" ]
+       then
+               T1="line"
+       else
+               T1="block"
+       fi
+
        NAME=${NAME:2}
        NAME=${NAME%.grm}
-       echo "$NAME $TITLE"
+       TYPE="$T1/$T2"
+
+       echo "$NAME $TYPE $TITLE"
 done