From b999d7424b5d69a5f9ce2ef2e238a867a91d33da Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Thu, 4 Oct 2007 11:25:43 +0200 Subject: [PATCH] livecd-rootfs (0.38) gutsy; urgency=low * Avoid the ${ROOT} prefix in fdupes output, compact and sort the output. -- Matthias Klose Thu, 04 Oct 2007 10:13:48 +0200 --- debian/changelog | 6 ++++++ livecd.sh | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 34979da9..b6c42536 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (0.38) gutsy; urgency=low + + * Avoid the ${ROOT} prefix in fdupes output, compact and sort the output. + + -- Matthias Klose Thu, 04 Oct 2007 10:13:48 +0200 + livecd-rootfs (0.37) gutsy; urgency=low * Run fdupes on ${ROOT}/usr. diff --git a/livecd.sh b/livecd.sh index 11c77590..72f67589 100755 --- a/livecd.sh +++ b/livecd.sh @@ -383,8 +383,14 @@ deb-src ${SECSRCMIRROR} ${STE}-security ${COMP} # search for duplicate files, write the summary to stdout, if which fdupes >/dev/null 2>&1; then + echo "first line: " + echo "data lines: [ ...]" echo BEGIN fdupes - fdupes --recurse --noempty --sameline --size --quiet ${ROOT}/usr + (cd $ROOT \ + && fdupes --recurse --noempty --sameline --size --quiet usr \ + | awk '/bytes each/ {s=$1} /^usr/ { n+=1; n2+=NF-1; sum+=s*(NF-1); print s*(NF-1),size, NF, $0 } END {print sum, n, n2}' \ + | sort -nr + ) echo END fdupes fi