Newer version of the script upstream

This commit is contained in:
Pierre Pronchery 2014-05-09 03:49:51 +02:00
parent 548465b453
commit 61bc49c0b8

View File

@ -151,11 +151,13 @@ while [ $# -gt 0 ]; do
ext="${ext##.}" ext="${ext##.}"
case "$ext" in case "$ext" in
html) html)
instdir="$DATADIR/doc/$ext/$PACKAGE"
source="${target%.*}.xml" source="${target%.*}.xml"
xpath="string(/refentry/refmeta/manvolnum)" xpath="string(/refentry/refmeta/manvolnum)"
section=$($XMLLINT --xpath "$xpath" "$source") section=$($XMLLINT --xpath "$xpath" "$source")
[ $? -eq 0 -a -n "$section" ] || exit 2 if [ $? -eq 0 -a -n "$section" ]; then
instdir="$DATADIR/man/html$section" instdir="$DATADIR/man/html$section"
fi
;; ;;
pdf) pdf)
instdir="$DATADIR/doc/$ext/$PACKAGE" instdir="$DATADIR/doc/$ext/$PACKAGE"