5 more_authoritative=( ~/quartz/example_source_code/inova_legacy ~/feisty_meow ~/scavenging_inova/inovasoft )
6 ###not yet ~/scavenging_inova/lightlink
8 if [ -z "$TMP" ]; then TMP=/tmp; fi
10 # we generate the full directory list for the authoritative places into here.
11 zesty_authoritative_dirs=$(mktemp $TMP/cleanerator_authority.XXXXXX)
12 # we also make a list of all the directories under our cleaning locations here.
13 perky_scrubbing_dirs=$(mktemp $TMP/cleanerator_scrubbinz.XXXXXX)
15 # dump out the directories found in the authoritative areas.
16 for i in "${more_authoritative[@]}"; do
17 real_dir="$(\cd "$i" && \pwd)"
18 find "$real_dir" -type d | grep -v "\.svn" | grep -v "\.git" >>"$zesty_authoritative_dirs"
21 # now go to all of our places to clean, find all directories under them,
22 # and add them to our big list of places to scrub.
23 for i in "${cleaning_dirs[@]}"; do
24 real_dir="$(\cd "$i" && \pwd)"
25 find "$real_dir" -depth -type d | grep -v "\.svn" | grep -v "\.git" >>"$perky_scrubbing_dirs"
28 # load all the names from our files and do a massive N x M size loop.
31 pushd "$i" &>/dev/null
34 # echo "against authority: $j"
35 # try to clean it out of source control first.
36 bash ~/feisty_meow/scripts/rev_control/svn_rm_dupes.sh "$j" "$i"
37 # if that doesn't work, just whack it.
38 bash ~/feisty_meow/scripts/files/whack_dupes.sh "$j" "$i"
39 done <"$zesty_authoritative_dirs"
41 done <"$perky_scrubbing_dirs"
43 # clean up afterwards.
44 rm -f "$zesty_authoritative_dirs"
45 rm -f "$perky_scrubbing_dirs"