+#export DEBUG_FEISTY_MEOW=true
+
+##############
+
+# this script cannot handle figuring out where it lives, so approaches that
+# get the WORKDIR 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 thing on multiple lines):
+
+##############
+ exec bash -i 3<<EOF 4<&0 <&3
+ echo -e '\n\n^^^ errors above here indicate potential problems in .bashrc ^^^';
+ export FEISTY_MEOW_APEX=\"\$(pwd)\"; export FEISTY_MEOW_SCRIPTS=\$FEISTY_MEOW_APEX/scripts;
+ export FEISTY_MEOW_SHOW_LAUNCH_GREETING=yes;
+ /bin/bash \$(pwd)/scripts/core/reconfigure_feisty_meow.sh;
+ source \$(pwd)/scripts/core/launch_feisty_meow.sh; exec 3>&- <&4
+EOF