From f3758c6c3bfd71aa63fb4f8dcd1164172b247ab2 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 19 Feb 2016 01:51:24 +0100 Subject: [PATCH] Import the latest scripts upstream --- data/pkgconfig.sh | 9 +++++++-- doc/docbook.sh | 11 ++++++++--- po/gettext.sh | 3 ++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/data/pkgconfig.sh b/data/pkgconfig.sh index 8719e7b..83479f5 100755 --- a/data/pkgconfig.sh +++ b/data/pkgconfig.sh @@ -41,7 +41,7 @@ SED="sed" #debug _debug() { - echo "$@" 1>&2 + echo "$@" 1>&3 "$@" } @@ -105,6 +105,7 @@ if [ -z "$VERSION" ]; then fi PKGCONFIG="$PREFIX/lib/pkgconfig" +exec 3>&1 while [ $# -gt 0 ]; do target="$1" shift @@ -122,7 +123,11 @@ while [ $# -gt 0 ]; do if [ "$install" -eq 1 ]; then source="${target#$OBJDIR}" $DEBUG $MKDIR -- "$PKGCONFIG" || exit 2 - $DEBUG $INSTALL "$target" "$PKGCONFIG/$source" || exit 2 + basename="$source" + if [ "${source##*/}" != "$source" ]; then + basename="${source##*/}" + fi + $DEBUG $INSTALL "$target" "$PKGCONFIG/$basename"|| exit 2 continue fi 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 diff --git a/po/gettext.sh b/po/gettext.sh index bf53b2b..5bb7c9b 100755 --- a/po/gettext.sh +++ b/po/gettext.sh @@ -45,7 +45,7 @@ XGETTEXT="xgettext --force-po" #debug _debug() { - echo "$@" 1>&2 + echo "$@" 1>&3 "$@" } @@ -147,6 +147,7 @@ if [ -z "$PACKAGE" ]; then fi LOCALEDIR="$PREFIX/share/locale" +exec 3>&1 while [ $# -gt 0 ]; do target="$1" source="${target#$OBJDIR}"