X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=88f3d315032f2283bc5d24108606fec98be8bcb3;hb=8215b157cb2b22ca58b9a8090fa8baabace90be2;hp=9674e3b3eec672239dddeb77635428a46e1de35e;hpb=78f64aac6aa23781a597cb74d96d5446d28964dd;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 9674e3b3..88f3d315 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -251,7 +251,7 @@ if [ -z "$skip_all" ]; then 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 @@ -275,6 +275,20 @@ if [ -z "$skip_all" ]; then echo } + # a wrapper for the which command that finds items on the path. some OSes + # do not provide which, so we want to not be spewing errors when that + # happens. + function whichable() + { + to_find="$1"; shift + which which &>/dev/null + if [ $? -ne 0 ]; then + # there is no which command here. we produce nothing due to this. + echo + fi + echo $(which $to_find) + } + # copies a set of custom scripts into the proper location for feisty meow # to merge their functions and aliases with the standard set. function recustomize() @@ -291,7 +305,16 @@ if [ -z "$skip_all" ]; then 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 }