-if [ -z "$FEISTY_MEOW_GENERATED" ]; then
- # FEISTY_MEOW_GENERATED is where the generated files yeti uses are located.
- # this is our single entry point we can use without knowing any variables
- # yet in the initialization process.
- export FEISTY_MEOW_GENERATED="$HOME/.zz_auto_gen"
-#hmmm: the above is kind of a constant. that's not so great.
+# first step--capture the current path if we haven't already.
+if [ -z "$FEISTY_MEOW_ORIGINAL_PATH" ]; then
+ export FEISTY_MEOW_ORIGINAL_PATH="$PATH"
+fi
+
+##############
+
+# this script cannot handle figuring out where it lives, so approaches that
+# get the THISDIR will fail. this is a consequence of this always being used
+# in bash's 'source' directive, which does not pass the script name as
+# argument 0. instead, we just check for the bad condition of a malconfigured
+# script system and try to repair it.
+
+# we start out thinking things are good.
+NO_REPAIRS_NEEDED=true
+
+# check if any crucial folder is hosed. we will torch the existing config
+# to the extent we can.
+if [ ! -d "$FEISTY_MEOW_APEX" ]; then
+ # flag some problems.
+ unset NO_REPAIRS_NEEDED
+ # wipe out the offending variable(s).
+ unset FEISTY_MEOW_SCRIPTS FEISTY_MEOW_APEX
+ # clean out any unfortunate wrongness that may exist in our generated areas.
+ if [ -d "$FEISTY_MEOW_LOADING_DOCK" ]; then \rm -rf "$FEISTY_MEOW_LOADING_DOCK"; fi
+ if [ -d "$FEISTY_MEOW_GENERATED_STORE" ]; then \rm -rf "$FEISTY_MEOW_GENERATED_STORE"; fi
+ # also wipe any values from the variables pointing at generated stuff.
+ unset FEISTY_MEOW_LOADING_DOCK FEISTY_MEOW_GENERATED_STORE
+ echo "
+
+The feisty meow configuration is damaged somehow. Please change to the
+directory where it is stored, e.g.:
+
+ cd /opt/feistymeow.org/feisty_meow
+
+and run this command (the whole unwieldy multiple line chunk inside the bars):