nice changes that reload the feisty meow environment when either regenerate or recust...
authorChris Koeritz <fred@gruntose.com>
Thu, 26 Mar 2015 01:55:41 +0000 (21:55 -0400)
committerChris Koeritz <fred@gruntose.com>
Thu, 26 Mar 2015 01:55:41 +0000 (21:55 -0400)
scripts/core/functions.sh
scripts/core/variables.sh

index 55a45aecb1dad37e8fac1907a1fa1dc5351a1915..61118b7e8ff9e919d49904992915cb41140929f1 100644 (file)
@@ -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
index dbef4552f66ab61dfa9322927a0155a16a207776..31da35faf7c2413186721c9bf70a33067ac7ce42 100644 (file)
@@ -190,7 +190,6 @@ if [ -z "$NECHUNG" ]; then
   ##############
   
   if [ ! -z "$SHELL_DEBUG" ]; then echo variables initialization ends....; fi
-
 fi
 
 ##############