From e5073919fc09218f1b0799f7c3c33ae343b68e49 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 13 Nov 2017 20:05:23 -0500 Subject: [PATCH] cleanups for fredme and feistyme macros --- infobase/feisty_inits/dot.bashrc-root | 2 +- readme.txt | 4 ++++ scripts/core/common.alias | 9 ++++----- scripts/core/connect_feisty_meow.sh | 10 ++++++---- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/infobase/feisty_inits/dot.bashrc-root b/infobase/feisty_inits/dot.bashrc-root index 453a0fbd..e0facb15 100644 --- a/infobase/feisty_inits/dot.bashrc-root +++ b/infobase/feisty_inits/dot.bashrc-root @@ -24,7 +24,7 @@ export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow" # the "fredme" macro enables the feisty_meow environment. alias fredme='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"' -# synonym for fredme. +# synonym for fredme which makes more sense to most people. alias feistyme='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"' # if not commented out, then feisty meow will run all the unit tests during builds. diff --git a/readme.txt b/readme.txt index 0fda046e..ca3b7459 100644 --- a/readme.txt +++ b/readme.txt @@ -34,6 +34,10 @@ Connect the feisty meow scripts to your login script (in ~/.bashrc). Note that this actually modifies ~/.bashrc. This step is only needed once. # bash /opt/feistymeow.org/feisty_meow/scripts/core/connect_feisty_meow.sh +| For the root user, you can pass a flag '--root' to the connect_feisty_meow +| script. This will add an alias for 'feistyme' which loads the feisty meow +| scripts on demand (instead of automatically upon login). + Load the script environment into the current shell. This can be done for any new shell. This is idempotent, so it does no harm to run it again. Note that you should not need this step if you connected feisty meow to diff --git a/scripts/core/common.alias b/scripts/core/common.alias index e1554152..9c94ef16 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -133,11 +133,10 @@ define_yeti_alias why='echo We all wonder what the point of the universe is at t ############## -# remove the fredization macro if it was defined, helping to avoid running -# the shell scripts twice for users like root that don't always load this -# stuff. -unalias fredme &>/dev/null -unalias feistyme &>/dev/null +# remove the "fredization" or "feistymeowization" macros if they're defined, +# which reduces the chance of loading the shell environment twice for users +# like root that don't load feisty meow automatically. +unalias fredme feistyme &>/dev/null ############## diff --git a/scripts/core/connect_feisty_meow.sh b/scripts/core/connect_feisty_meow.sh index 6a226b8d..6f6ffd38 100644 --- a/scripts/core/connect_feisty_meow.sh +++ b/scripts/core/connect_feisty_meow.sh @@ -27,10 +27,12 @@ else >> "$HOME/.bashrc" echo "Feisty Meow is now configured in '~/.bashrc' for standard users." else - # stuff the root user init file into .bashrc. this one doesn't automatically load - # feisty meow. instead, it provides a fredme macro to load the feisty meow scripts. - # fredme comes from the main author being fred t. hamster. we have since added a - # feistyme macro too, to be less personalized... + # stuff the root user init file into .bashrc. this one doesn't + # automatically load the feisty meow scripts. instead, there is a macro + # (uhh, an alias) that loads the feisty meow scripts. the 'fredme' macro + # comes from the main author of feisty meow, named fred t. hamster. we + # have since added a 'feistyme' macro too, to be slightly less + # idiosyncratic, as if that were possible. cat $FEISTY_MEOW_APEX/infobase/feisty_inits/dot.bashrc-root | sed -e \ "s?FEISTY_MEOW_APEX=\".*\"?FEISTY_MEOW_APEX=\"$FEISTY_MEOW_APEX\"?" \ -- 2.34.1