From 9ebae4831763d4c2851286f7fea265c27bd500e5 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 11 Oct 2021 16:57:13 -0400 Subject: [PATCH] implemented path preservation across regeneration saving the original path lets us avoid continually adding more elements to the path variable. --- scripts/core/functions.sh | 9 ++++++++- scripts/core/launch_feisty_meow.sh | 9 ++++++++- scripts/generator/build_variables.sh | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 8ad72ccf..c4510795 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -509,9 +509,16 @@ if [ -z "$skip_all" ]; then bash $FEISTY_MEOW_SCRIPTS/core/reconfigure_feisty_meow.sh echo # force a full reload by turning off sentinel variables and methods. - unset -v CORE_VARIABLES_LOADED FEISTY_MEOW_LOADING_DOCK USER_CUSTOMIZATIONS_LOADED + unset -v CORE_VARIABLES_LOADED FEISTY_MEOW_LOADING_DOCK USER_CUSTOMIZATIONS_LOADED \ + BUILD_VARS_LOADED unalias CORE_ALIASES_LOADED &>/dev/null unset -f function_sentinel + + # reuse the original path if we can. + if [ ! -z "$FEISTY_MEOW_ORIGINAL_PATH" ]; then + export PATH="$FEISTY_MEOW_ORIGINAL_PATH" + fi + # reload feisty meow environment in current shell. log_feisty_meow_event "reloading the feisty meow scripts for $USER in current shell." source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index 1e7e6c99..2f8aca08 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -18,6 +18,13 @@ ############## +# 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 @@ -118,7 +125,7 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then # this is our single entry point we can use without knowing any variables # yet in the initialization process. export FEISTY_MEOW_LOADING_DOCK="$HOME/.zz_feisty_loading" - #hmmm: the above is kind of a constant. that's not so great. +#hmmm: the above is kind of a constant. that's not so great. # make sure our main variables are established. FEISTY_MEOW_VARIABLES_LOADING_FILE="$FEISTY_MEOW_LOADING_DOCK/fmc_variables.sh" diff --git a/scripts/generator/build_variables.sh b/scripts/generator/build_variables.sh index 3031d317..6e8fa38e 100644 --- a/scripts/generator/build_variables.sh +++ b/scripts/generator/build_variables.sh @@ -181,7 +181,7 @@ if [ -z "$got_bad" ]; then # where we store the binaries used for building the rest of the code base. export CLAM_BINARIES="$RUNTIME_PATH/clam_bin" - # the final destination for the new binaries which provide the hoople + # the final destination for the new binaries which provide the # build with all the applications it needs to get going. export TARGETS_STORE="$RUNTIME_PATH/binaries" # targets directory is meaningful to clam, which will use it for output. -- 2.34.1