From: Zac Medico Date: Tue, 27 Mar 2007 20:55:42 +0000 (-0000) Subject: forcibly break all hard links so we dont need to rely on --force in compressor (trunk... X-Git-Tag: v2.1.2.3~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=754d9c9e899b9338407988cc802e39c0afc30812;p=portage.git forcibly break all hard links so we dont need to rely on --force in compressor (trunk r6220:6221) svn path=/main/branches/2.1.2/; revision=6296 --- diff --git a/bin/ecompressdir b/bin/ecompressdir index cad0ce26c..d061db1f7 100755 --- a/bin/ecompressdir +++ b/bin/ecompressdir @@ -57,6 +57,10 @@ for dir in "$@" ; do funk_up_dir "decompress" "gz" "gunzip" funk_up_dir "decompress" "bz2" "bunzip2" + # forcibly break all hard links as some compressors whine about it + find "${dir}" -type f -links +1 -exec env file="{}" sh -c \ + 'cp -p "${file}"{,.ecompress.break} ; mv -f "${file}"{.ecompress.break,}' \; + # now lets do our work [[ -z ${suffix} ]] && continue vecho "${0##*/}: $(ecompress --bin) ${dir#${D}}"