From 9994f7adcee03266814c6f7ad2cabf0b6820fa95 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 18 Oct 2015 22:23:50 +0200 Subject: [PATCH] Synchronize with upstream --- doc/docbook.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/docbook.sh b/doc/docbook.sh index fda4e2d..620374f 100755 --- a/doc/docbook.sh +++ b/doc/docbook.sh @@ -1,6 +1,6 @@ #!/bin/sh #$Id$ -#Copyright (c) 2012-2014 Pierre Pronchery +#Copyright (c) 2012-2015 Pierre Pronchery # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: @@ -42,7 +42,7 @@ XSLTPROC="xsltproc --nonet --xinclude" #debug _debug() { - echo "$@" 1>&2 + echo "$@" 1>&3 "$@" } @@ -151,6 +151,7 @@ fi [ -z "$DATADIR" ] && DATADIR="$PREFIX/share" [ -z "$MANDIR" ] && MANDIR="$DATADIR/man" +exec 3>&1 while [ $# -gt 0 ]; do target="$1" shift @@ -194,7 +195,11 @@ while [ $# -gt 0 ]; do #install if [ "$install" -eq 1 ]; then source="${target#$OBJDIR}" - $DEBUG $MKDIR -- "$instdir" || exit 2 + dirname= + if [ "${source%/*}" != "$source" ]; then + dirname="/${source%/*}" + fi + $DEBUG $MKDIR -- "$instdir$dirname" || exit 2 $DEBUG $INSTALL "$target" "$instdir/$source" || exit 2 continue fi