if [ ! -d "$1" ]; then mkdir -p "$1"; fi
cd "$1"
}
-
+
+ # checks the result of the last command that was run, and if it failed,
+ # then this complains and exits from bash. the function parameters are
+ # used as the message to print as a complaint.
+ function check_result()
+ {
+ if [ $? -ne 0 ]; then
+ echo -e "failed on: $*"
+ exit 1
+ fi
+ }
+
# locates a process given a search pattern to match in the process list.
function psfind() {
local PID_DUMP="$(mktemp "$TMP/zz_pidlist.XXXXXX")"
if [ -z "$wheres_nechung" ]; then
echo "The nechung oracle program cannot be found. You may want to consider"
echo "rebuilding the feisty meow applications with this command:"
- echo " bash $FEISTY_MEOW_SCRIPTS/generator/bootstrap_build.sh"
+ echo "bash $FEISTY_MEOW_SCRIPTS/generator/bootstrap_build.sh"
else
$wheres_nechung
fi
return 1
fi
regenerate >/dev/null
+ pushd "$FEISTY_MEOW_GENERATED/custom" &>/dev/null
+ local incongruous_files="$(bash "$FEISTY_MEOW_SCRIPTS/files/list_non_dupes.sh" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_GENERATED/custom")"
+ if [ ${#incongruous_files} -ge 1 ]; then
+ echo "cleaning unknown older overrides..."
+ perl "$FEISTY_MEOW_SCRIPTS/files/safedel.pl" $incongruous_files
+ echo
+ fi
+ popd &>/dev/null
echo "copying custom overrides for $user"
+ mkdir "$FEISTY_MEOW_GENERATED/custom" 2>/dev/null
perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_GENERATED/custom"
regenerate
}