}
if (length($DEBUG_FEISTY_MEOW)) {
print "using these alias files:\n";
+print "HEY IS THIS PROBLEM CHILD?\n";
foreach $i (@ALIAS_DEFINITION_FILES) {
local $base_of_dir = &basename(&dirname($i));
local $basename = &basename($i);
print " $base_of_dir/$basename\n";
}
+print "WAS PROBLEM CHILD ABOVE HERE?\n";
}
# write the aliases for sh and bash scripts.
##############
-ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )"
-CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
-THIS_TOOL_NAME="$(basename "$0")"
-# repair some paths that we should always be able to auto-calculate.
-export FEISTY_MEOW_SCRIPTS="$( \cd "$CORE_SCRIPTS_DIR/.." && /bin/pwd )"
-export FEISTY_MEOW_APEX="$( \cd "$FEISTY_MEOW_SCRIPTS/.." && /bin/pwd )"
+# 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.
+
+# check if any crucial folder is hosed. we will torch the existing config
+# to the extent we can.
+if [ ! -d "$FEISTY_MEOW_SCRIPTS" -o ! -d "$FEISTY_MEOW_APEX" ]; then
+ # 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
+ exec "$*"
+fi
##############
#echo after the generate aliases, perllib is $PERLLIB
if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
- echo established these variables for feisty_meow assets:
+ echo this is the variable config file for feisty_meow assets:
echo ==============
cat "$FEISTY_MEOW_VARIABLES_LOADING_FILE"
echo ==============