diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-01-11 22:28:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-01-11 22:28:23 +0000 |
commit | b2cd37eb6ccac05dc2f4ff02e686c26349899a7f (patch) | |
tree | 772a87428f2491d3e83950bc29743c9365c9ad43 | |
parent | 4c93236b70445b62f9f1286ed2a7414a7b46e679 (diff) | |
download | portage-b2cd37eb6ccac05dc2f4ff02e686c26349899a7f.tar.gz portage-b2cd37eb6ccac05dc2f4ff02e686c26349899a7f.tar.bz2 portage-b2cd37eb6ccac05dc2f4ff02e686c26349899a7f.zip |
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
-rwxr-xr-x | bin/ecompressdir | 11 |
1 files 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 |