fileset

git mirror of https://ccx.te2000.cz/bzr/fileset
git clone https://ccx.te2000.cz/git/fileset
Log | Files | Refs | README

commit a2e6a7343c6a31eff637b7aae9187ed153c04236
parent 64a55ef04772b3fb601254a9e64cc4268d0c4a74
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Wed, 13 Aug 2014 13:50:38 +0200

script for detecting duplicates in filesets
Diffstat:
Abin/fileset_duplicates.awk | 24++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)

diff --git a/bin/fileset_duplicates.awk b/bin/fileset_duplicates.awk @@ -0,0 +1,24 @@ +#!/usr/bin/awk -f +BEGIN { + FS="\t" + current = "<unmarked>" +} +/^# FILE / { + sub(/^# FILE +/, "") + current = $0 +} +/^\// { + if($1 in fnames) { + if(fnames[$1] != current) { + dupes[$1] = dupes[$1] + 1 + fnames[$1] = fnames[$1] "\n" current + } + } else { + fnames[$1] = current + } +} +END { + for(fname in dupes) { + printf "duplicate filename %s found in:\n%s\n\n", fname, fnames[fname] + } +}