diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-12 01:47:04 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-12 01:47:04 -0700 |
commit | 22ab3600b09fd1e4741454d221b5006a1a50efb1 (patch) | |
tree | e2095b28c85ccd2420dc474d1d0df8bfc3cd98f0 | |
parent | 65c1a6e0dddf0d99af7adbd41484150d5fc6ef9c (diff) | |
download | portage-22ab3600b09fd1e4741454d221b5006a1a50efb1.tar.gz portage-22ab3600b09fd1e4741454d221b5006a1a50efb1.tar.bz2 portage-22ab3600b09fd1e4741454d221b5006a1a50efb1.zip |
Fix faulty $? handling in *into functions (from previous commit).
-rwxr-xr-x | bin/ebuild.sh | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 01fa46217..f9bfb3400 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -779,9 +779,10 @@ into() { else export DESTTREE=$1 if [ ! -d "${D}${DESTTREE}" ]; then - if ! install -d "${D}${DESTTREE}"; then - ret=$? - [[ $ret -ne 0 ]] && helpers_die "$0 failed" + install -d "${D}${DESTTREE}" + local ret=$? + if [[ $ret -ne 0 ]] ; then + helpers_die "$0 failed" return $ret fi fi @@ -794,9 +795,10 @@ insinto() { else export INSDESTTREE=$1 if [ ! -d "${D}${INSDESTTREE}" ]; then - if ! install -d "${D}${INSDESTTREE}"; then - ret=$? - [[ $ret -ne 0 ]] && helpers_die "$0 failed" + install -d "${D}${INSDESTTREE}" + local ret=$? + if [[ $ret -ne 0 ]] ; then + helpers_die "$0 failed" return $ret fi fi @@ -809,9 +811,10 @@ exeinto() { else export _E_EXEDESTTREE_="$1" if [ ! -d "${D}${_E_EXEDESTTREE_}" ]; then - if ! install -d "${D}${_E_EXEDESTTREE_}"; then - ret=$? - [[ $ret -ne 0 ]] && helpers_die "$0 failed" + install -d "${D}${_E_EXEDESTTREE_}" + local ret=$? + if [[ $ret -ne 0 ]] ; then + helpers_die "$0 failed" return $ret fi fi @@ -824,9 +827,10 @@ docinto() { else export _E_DOCDESTTREE_="$1" if [ ! -d "${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" ]; then - if ! install -d "${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"; then - ret=$? - [[ $ret -ne 0 ]] && helpers_die "$0 failed" + install -d "${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" + local ret=$? + if [[ $ret -ne 0 ]] ; then + helpers_die "$0 failed" return $ret fi fi |