Simon Stelling writes in Bug 121317:
authorMike Frysinger <vapier@gentoo.org>
Sat, 4 Feb 2006 05:17:07 +0000 (05:17 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 4 Feb 2006 05:17:07 +0000 (05:17 -0000)
currently, the do* scripts don't exit with a non-zero status when a critical
command fails, except if it is the last one.  install as much as possible, then exit appropriately.

svn path=/main/trunk/; revision=2650

bin/dodir

index 88b201ad7d5708d6e3db3e194d8afe272b41e3e6..ced7ff70f209339e1da1295f2cf53841db949577 100755 (executable)
--- a/bin/dodir
+++ b/bin/dodir
@@ -3,6 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/dodir,v 1.5 2004/10/04 13:56:50 vapier Exp $
 
+ret=0
+
 for x in "$@" ; do
        install -d ${DIROPTIONS} "${D}${x}"
+       ((ret+=$?))
 done
+
+exit ${ret}