From e6d387610ce692dfef3c6a3fc549d29863410176 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 1 Jun 2012 19:28:31 -0700 Subject: ecompressdir: fix funk_up_dir return value --- bin/ebuild-helpers/ecompressdir | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir index a2c9e52a0..7d5d4322b 100755 --- a/bin/ebuild-helpers/ecompressdir +++ b/bin/ebuild-helpers/ecompressdir @@ -61,11 +61,11 @@ funk_up_dir() { local negate="" [[ ${act} == "compress" ]] && negate="!" + local ret=0 # first we act on all the files find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary} ((ret|=$?)) - find "${dir}" -type l -print0 | \ while read -r -d $'\0' brokenlink ; do [[ -e ${brokenlink} ]] && continue olddest=$(readlink "${brokenlink}") @@ -88,7 +88,8 @@ funk_up_dir() { && ln -snf "${newdest}" "${brokenlink}${suffix}" \ || ln -snf "${newdest}" "${brokenlink%${suffix}}" ((ret|=$?)) - done + done < <(find "${dir}" -type l -print0) + return ${ret} } # _relocate_skip_dirs(srctree, dsttree) @@ -170,6 +171,7 @@ for dir in "$@" ; do if [[ -n ${suffix} ]] ; then vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}" funk_up_dir "compress" "${suffix}" "ecompress" + : $(( ret |= $? )) fi # finally, restore the skipped stuff -- cgit v1.2.3-1-g7c22