From: Mike Frysinger Date: Thu, 11 Jan 2007 22:28:23 +0000 (-0000) Subject: dont compress files that are already compressed and dont do sanity checking on the... X-Git-Tag: v2.1.2~56 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b2cd37eb6ccac05dc2f4ff02e686c26349899a7f;p=portage.git dont compress files that are already compressed and dont do sanity checking on the link dest as we cant properly verify things like absolute symlinks svn path=/main/trunk/; revision=5575 --- diff --git a/bin/ecompressdir b/bin/ecompressdir index 405f8e2f5..f6b7ed74d 100755 --- a/bin/ecompressdir +++ b/bin/ecompressdir @@ -25,19 +25,14 @@ for dir in "$@" ; do vecho "${0##*/}: $(ecompress --bin) ${dir#${D}}" fi - find "${dir}" -type f -print0 | xargs -0 ecompress + find "${dir}" -type f '!' -name '*'$(ecompress --suffix) -print0 | xargs -0 ecompress ((ret+=$?)) find -L "${dir}" -type l | \ while read brokenlink ; do olddest=$(readlink "${brokenlink}") newdest="${olddest}${suffix}" - if [[ -e ${newdest} ]] ; then - ln -snf "${newdest}" "${brokenlink}" - ((ret+=$?)) - else - vecho "ecompressdir: unknown broken symlink: ${brokenlink}" - ((++ret)) - fi + ln -snf "${newdest}" "${brokenlink}" + ((ret+=$?)) done done