Making extraction of the manpage section in manpages/Makefile work with multiple...
authorDaniel Baumann <daniel@debian.org>
Sun, 8 Apr 2012 20:53:58 +0000 (22:53 +0200)
committerDaniel Baumann <daniel@debian.org>
Sun, 8 Apr 2012 20:53:58 +0000 (22:53 +0200)
manpages/Makefile

index 52f1bba..d2643e5 100644 (file)
@@ -12,7 +12,7 @@ po4a.cfg:
 
        for MANPAGE in en/*; \
        do \
-               SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
+               SECTION="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
                echo "[type: man] $${MANPAGE} \$$lang:\$$lang/$$(basename $${MANPAGE} .$${SECTION}).\$$lang.$${SECTION}" >> po4a.cfg; \
        done