Date: Wed, 09 Jan 2013 15:55:34 -0500 From: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> To: Fbsd8 <fbsd8@a1poweruser.com>, FreeBSD questions <questions@freebsd.org> Subject: Re: sh script problem with capturing return code Message-ID: <44zk0it6t5.fsf@lowell-desk.lan> In-Reply-To: <444niqum7n.fsf@lowell-desk.lan> (Lowell Gilbert's message of "Wed, 09 Jan 2013 15:37:32 -0500") References: <50EC9009.3030305@a1poweruser.com> <20130108224626.8c2d89cd.freebsd@edvax.de> <50EC99F2.3020404@a1poweruser.com> <44d2xevlhb.fsf@lowell-desk.lan> <50ED88CF.7060308@a1poweruser.com> <448v82unxb.fsf@lowell-desk.lan> <444niqum7n.fsf@lowell-desk.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> writes: > It's not; ignore my example. The extra directory was under the ignored > directory, so it's testing the right properties. I think if I create the > new subdirectory under the other main directory, it would be right. Confirmed. The test case now looks like this: ================================================================ mkdir etc home mtree -c -d > ../out mtree -d < ../out echo $? echo "That was the first: should be 0." mkdir etc/temp mtree -u -d < ../out echo $? echo "That was the second: should be 2." sed -i "" 's/^\(home[ ]*\)\(.*\)$/\1ignore/' ../out mtree -d < ../out echo $? echo "That was the third: should be 0." ================================================================ I think it's a real bug, and the test cases don't cover "extra" elements at all. Now I just have to figure out the right fix.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44zk0it6t5.fsf>