diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-03-30 19:51:53 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-03-30 19:51:53 +0000 |
commit | 26e962f5125940b296016f22901b608a5c49a6e2 (patch) | |
tree | ad506efce111614fe6a0b98e05045b01ef01ec2d /bin/doins | |
parent | a74ff46a80552d9d2646f5ee9bd09b949b79d707 (diff) | |
download | portage-26e962f5125940b296016f22901b608a5c49a6e2.tar.gz portage-26e962f5125940b296016f22901b608a5c49a6e2.tar.bz2 portage-26e962f5125940b296016f22901b608a5c49a6e2.zip |
* Fix broken return value for doins.
* Make newins cleanup temp files after itself.
(trunk r9634)
svn path=/main/branches/2.1.2/; revision=9635
Diffstat (limited to 'bin/doins')
-rwxr-xr-x | bin/doins | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -28,7 +28,7 @@ fi [[ ! -d ${D}${INSDESTTREE} ]] && dodir "${INSDESTTREE}" _doins() { - local mysrc="$1" mydir="$2" cleanup="" + local mysrc="$1" mydir="$2" cleanup="" rval if [ -L "$mysrc" ] ; then cp "$mysrc" "${T}" @@ -37,7 +37,9 @@ _doins() { fi install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}/${mydir}" + rval=$? [[ -n ${cleanup} ]] && rm -f "${cleanup}" + return $rval } _xdoins() { @@ -46,6 +48,8 @@ _xdoins() { done } +success=0 + for x in "$@" ; do if [ -d "$x" ] ; then if [ "${DOINSRECUR}" == "n" ] ; then @@ -63,7 +67,10 @@ for x in "$@" ; do find "${x##*/}" -type d -exec dodir "${INSDESTTREE}/{}" \; find "${x##*/}" \( -type f -or -type l \) -print0 | _xdoins popd >/dev/null + ((++success)) else - _doins "${x}" + _doins "${x}" && ((++success)) fi done + +[ $success -gt 0 ] && exit 0 || exit 1 |