From f799e53be210af2e72697045c45274a120536813 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Wed, 25 Mar 2015 21:55:41 -0400 Subject: [PATCH] nice changes that reload the feisty meow environment when either regenerate or recustomize are called. this just drops the two sentinels that normally prevent the environment from reloading. voila, instant gratification and one does not have to exit the shell or manually reload feisty meow. --- scripts/core/functions.sh | 15 ++++++++------- scripts/core/variables.sh | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 55a45aec..61118b7e 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -18,7 +18,7 @@ if [ -z "$skip_all" ]; then if [ ! -z "$SHELL_DEBUG" ]; then echo function definitions begin... fi - + # a handy little method that can be used for date strings. it was getting # really tiresome how many different ways the script did the date formatting. function date_stringer() { @@ -280,8 +280,14 @@ if [ -z "$skip_all" ]; then # recreates all the generated files that the feisty meow scripts use. function regenerate() { + # do the bootstrapping process again. bash $FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh echo + # force a full reload by turning off sentinel variable and alias. + unset NECHUNG function_sentinel + # reload feisty meow environment in current shell. + source ~/feisty_meow/scripts/core/launch_feisty_meow.sh + # run nechung oracle to give user a new fortune. nechung } @@ -337,14 +343,9 @@ if [ -z "$skip_all" ]; then 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" - # set up any custom script files which we'll add as aliases. -# if [ -e "$FEISTY_MEOW_GENERATED/custom/scripts" ]; then -# echo removing older custom scripts. -# rm -rf "$FEISTY_MEOW_GENERATED/custom/scripts" -# fi if [ -d "$FEISTY_MEOW_DIR/customizing/$user/scripts" ]; then echo "copying custom scripts for $user" - cp -R "$FEISTY_MEOW_DIR/customizing/$user/scripts" "$FEISTY_MEOW_GENERATED/custom/" + \cp -R "$FEISTY_MEOW_DIR/customizing/$user/scripts" "$FEISTY_MEOW_GENERATED/custom/" fi echo regenerate diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index dbef4552..31da35fa 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -190,7 +190,6 @@ if [ -z "$NECHUNG" ]; then ############## if [ ! -z "$SHELL_DEBUG" ]; then echo variables initialization ends....; fi - fi ############## -- 2.34.1