From b2cd37eb6ccac05dc2f4ff02e686c26349899a7f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Jan 2007 22:28:23 +0000 Subject: [PATCH] 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 --- bin/ecompressdir | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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 -- 2.26.2