dont compress files that are already compressed and dont do sanity checking on the...
authorMike Frysinger <vapier@gentoo.org>
Thu, 11 Jan 2007 22:28:23 +0000 (22:28 -0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 11 Jan 2007 22:28:23 +0000 (22:28 -0000)
svn path=/main/trunk/; revision=5575

bin/ecompressdir

index 405f8e2f542c9a093774412270fd5edb82d5a4c9..f6b7ed74d1ef298f33d68d5a2fb9e7a15f63c753 100755 (executable)
@@ -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