From dd57dbfd3736b3ec5f11ecfe55290e03c263082b Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 14 Oct 2017 00:28:28 +0200 Subject: [PATCH] Import updated scripts from upstream --- data/pkgconfig.sh | 10 +++++++--- doc/docbook.sh | 9 ++++++--- doc/gtkdoc.sh | 9 ++++++--- tools/subst.sh | 4 ++-- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/data/pkgconfig.sh b/data/pkgconfig.sh index 83479f5..3c1d191 100755 --- a/data/pkgconfig.sh +++ b/data/pkgconfig.sh @@ -1,6 +1,6 @@ #!/bin/sh #$Id$ -#Copyright (c) 2011-2015 Pierre Pronchery +#Copyright (c) 2011-2017 Pierre Pronchery # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: @@ -66,7 +66,7 @@ _usage() clean=0 install=0 uninstall=0 -while getopts "ciuP:" name; do +while getopts "ciuO:P:" name; do case $name in c) clean=1 @@ -79,6 +79,9 @@ while getopts "ciuP:" name; do install=0 uninstall=1 ;; + O) + export "${OPTARG%%=*}"="${OPTARG#*=}" + ;; P) PREFIX="$OPTARG" ;; @@ -89,7 +92,7 @@ while getopts "ciuP:" name; do esac done shift $(($OPTIND - 1)) -if [ $# -eq 0 ]; then +if [ $# -lt 0 ]; then _usage exit $? fi @@ -148,6 +151,7 @@ while [ $# -gt 0 ]; do #create source="${target#$OBJDIR}" source="${source}.in" + ([ -z "$OBJDIR" ] || $DEBUG $MKDIR -- "${target%/*}") || exit 2 $DEBUG $SED -e "s;@PACKAGE@;$PACKAGE;" \ -e "s;@VERSION@;$VERSION;" \ -e "s;@PREFIX@;$PREFIX;" \ diff --git a/doc/docbook.sh b/doc/docbook.sh index 620374f..115bc92 100755 --- a/doc/docbook.sh +++ b/doc/docbook.sh @@ -1,6 +1,6 @@ #!/bin/sh #$Id$ -#Copyright (c) 2012-2015 Pierre Pronchery +#Copyright (c) 2012-2017 Pierre Pronchery # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: @@ -114,7 +114,7 @@ _usage() clean=0 install=0 uninstall=0 -while getopts "ciuP:" name; do +while getopts "ciO:uP:" name; do case "$name" in c) clean=1 @@ -123,6 +123,9 @@ while getopts "ciuP:" name; do uninstall=0 install=1 ;; + O) + export "${OPTARG%%=*}"="${OPTARG#*=}" + ;; u) install=0 uninstall=1 @@ -137,7 +140,7 @@ while getopts "ciuP:" name; do esac done shift $((OPTIND - 1)) -if [ $# -eq 0 ]; then +if [ $# -lt 1 ]; then _usage exit $? fi diff --git a/doc/gtkdoc.sh b/doc/gtkdoc.sh index b32791c..776e280 100755 --- a/doc/gtkdoc.sh +++ b/doc/gtkdoc.sh @@ -1,6 +1,6 @@ #!/bin/sh #$Id$ -#Copyright (c) 2012-2015 Pierre Pronchery +#Copyright (c) 2012-2017 Pierre Pronchery # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: @@ -72,7 +72,7 @@ _usage() clean=0 install=0 uninstall=0 -while getopts "ciuP:" name; do +while getopts "ciO:uP:" name; do case "$name" in c) clean=1 @@ -81,6 +81,9 @@ while getopts "ciuP:" name; do uninstall=0 install=1 ;; + O) + export "${OPTARG%%=*}"="${OPTARG#*=}" + ;; u) install=0 uninstall=1 @@ -95,7 +98,7 @@ while getopts "ciuP:" name; do esac done shift $((OPTIND - 1)) -if [ $# -eq 0 ]; then +if [ $# -lt 1 ]; then _usage exit $? fi diff --git a/tools/subst.sh b/tools/subst.sh index 7f60bf4..1389192 100755 --- a/tools/subst.sh +++ b/tools/subst.sh @@ -1,6 +1,6 @@ #!/bin/sh #$Id$ -#Copyright (c) 2012-2016 Pierre Pronchery +#Copyright (c) 2012-2017 Pierre Pronchery # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: @@ -192,7 +192,7 @@ while getopts "ciuO:P:" name; do esac done shift $(($OPTIND - 1)) -if [ $# -eq 0 ]; then +if [ $# -lt 1 ]; then _usage exit $? fi