3 #hmmm: nice to set an interrupt handler for ctrl-c, to catch a break and send it to the cleanup of the crudfile.
5 # catch whether they want rigorous cleaning or not.
8 function whack_single_build_area()
10 local CLEANING_LOCALE="$1"; shift
11 if [ ! -d "$CLEANING_LOCALE" ]; then
12 # echo "the folder $CLEANING_LOCALE does not exist. not cleaning."
16 local choprepo="$(basename "$(dirname "$CLEANING_LOCALE")" )/$(basename "$CLEANING_LOCALE")"
17 echo $(date): "cleaning up [$choprepo]..."
18 if [ -z "$CLEANING_LOCALE" ]; then
19 echo "The CLEANING_LOCALE variable is not set!"
23 #old export NEW_TMP="$(mktemp -d "$CLEANING_LOCALE/TEMPS.XXXXXX")"
24 export NEW_TMP="$(mktemp -d "$TMP/temps-build-whacking.XXXXXX")"
25 export CRUDFILE="$(mktemp "$NEW_TMP/whack_build.XXXXXX")"
28 CLEANING_TOP="$CLEANING_LOCALE/production"
30 # echo $(date): " cleaning up the build products..."
32 # avoid accidentally removing way too much important stuff if our variables have not
33 # been previously established.
34 local GENERATED_DIR="$CLEANING_TOP/generated-feisty_meow"
35 #*** hmmm: above is wrong place now!
36 local TEMPORARIES_DIR="$CLEANING_TOP/temporaries"
40 "$FEISTY_MEOW_DIR/generatedJUnitFiles" \
41 "$CLEANING_TOP/binaries" \
42 "$CLEANING_TOP/install" \
43 "$CLEANING_TOP/logs" \
44 "$CLEANING_TOP/objects" \
47 "$CLEANING_TOP/__build_"*.h \
48 "$CLEANING_TOP/manifest.txt"
50 # echo $(date): " cleaning generated files in source hierarchy..."
52 if [ "$clean_src" == "clean" -o "$clean_src" == "CLEAN" ]; then
53 echo $(date): " ** aggressive cleaning activated..."
54 perl "$FEISTY_MEOW_SCRIPTS/files/zapdirs.pl" "$FEISTY_MEOW_DIR" >>"$CRUDFILE"
57 echo $(date): "cleaned [$choprepo]."
64 # clean all known hierarchies of build products...
66 whack_single_build_area "$FEISTY_MEOW_DIR"