3 # Author: Chris Koeritz
5 # this script adds the feisty inits code to .bashrc, if we think it has not yet been added.
7 # auto-locate the feisty meow scripts, since they supposedly are not enabled yet.
8 export THISDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory.
9 # normalize the path we want to cobble together.
10 export FEISTY_MEOW_APEX="$( \cd "$THISDIR/../.." && \pwd )"
12 echo calculated apex as $FEISTY_MEOW_APEX
16 if [ -f "$HOME/.bashrc" ] && grep -q "launch_feisty_meow.sh" "$HOME/.bashrc"; then
17 # the stanza for loading feisty meow already seems to be present.
18 echo "Feisty Meow already seems to be configured in '~/.bashrc'."
20 # check for the --root flag to see if they're trying to get the root version of inits.
21 if [ "$do_root" != "--root" ]; then
22 # stuff the "normal user" init file into .bashrc. not appropriate for root.
23 # this is the easy and quick start script for most folks.
24 cat $FEISTY_MEOW_APEX/infobase/feisty_inits/dot.bashrc-normal-user |
26 "s?FEISTY_MEOW_APEX=\".*\"?FEISTY_MEOW_APEX=\"$FEISTY_MEOW_APEX\"?" \
28 echo "Feisty Meow is now configured in '~/.bashrc' for standard users."
30 # stuff the root user init file into .bashrc. this one doesn't
31 # automatically load the feisty meow scripts. instead, there is a macro
32 # (uhh, an alias) that loads the feisty meow scripts. the 'fredme' macro
33 # comes from the main author of feisty meow, named fred t. hamster. we
34 # have since added a 'feistyme' macro too, to be slightly less
35 # idiosyncratic, as if that were possible.
36 cat $FEISTY_MEOW_APEX/infobase/feisty_inits/dot.bashrc-root |
38 "s?FEISTY_MEOW_APEX=\".*\"?FEISTY_MEOW_APEX=\"$FEISTY_MEOW_APEX\"?" \
40 echo "Feisty Meow is now configured in '~/.bashrc' for the root user."