dodoc: Honour exit status of install, bug 356389.
authorUlrich Mueller <ulm@gentoo.org>
Fri, 25 Feb 2011 07:43:17 +0000 (08:43 +0100)
committerZac Medico <zmedico@gentoo.org>
Tue, 1 Mar 2011 20:51:31 +0000 (12:51 -0800)
bin/ebuild-helpers/4/dodoc
bin/ebuild-helpers/dodoc

index d32343c71308864671963bbc515bd0f19751a53c..66a1f088b6c6de1afe8a98e3777a1a313573a8f3 100755 (executable)
@@ -27,6 +27,8 @@ for x in "$@" ; do
 
        if [ -d "${x}" ] ; then
                if [[ ${DOINSRECUR} == "n" ]] ; then
+                       echo "!!! ${0##*/}: $x is a directory" 1>&2
+                       ((ret|=1))
                        continue
                fi
 
@@ -36,7 +38,7 @@ for x in "$@" ; do
                                ${0} -r {} \;
 
        elif [ -s "${x}" ] ; then
-               install -m0644 "${x}" "${dir}"
+               install -m0644 "${x}" "${dir}" || ((ret|=1))
        elif [ ! -e "${x}" ] ; then
                echo "!!! ${0##*/}: $x does not exist" 1>&2
                ((ret|=1))
index 29b69011260dc7c376857913b8db6b8d0008eb95..67391a85516a5106bbdc0cf8ffe636792b09a928 100755 (executable)
@@ -16,8 +16,10 @@ fi
 
 ret=0
 for x in "$@" ; do
-       if [ -s "${x}" ] ; then
-               install -m0644 "${x}" "${dir}"
+       if [ -d "${x}" ] ; then
+               eqawarn "QA Notice: dodoc argument '${x}' is a directory"
+       elif [ -s "${x}" ] ; then
+               install -m0644 "${x}" "${dir}" || { ((ret|=1)); continue; }
                ecompress --queue "${dir}/${x##*/}"
        elif [ ! -e "${x}" ] ; then
                echo "!!! ${0##*/}: $x does not exist" 1>&2