From 252f0f5579bcfbfa72138fe65bc6b959ebbf751b Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 6 Oct 2015 18:22:16 +0200 Subject: [PATCH] Support installing targets in sub-directories --- doc/scripts/docbook.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/scripts/docbook.sh b/doc/scripts/docbook.sh index ebb08ea..620374f 100755 --- a/doc/scripts/docbook.sh +++ b/doc/scripts/docbook.sh @@ -195,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