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 WORKDIR="$( \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 "$WORKDIR/../.." && \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 automatically load
31 # feisty meow. instead, it provides a fredme macro to load the feisty meow scripts.
32 # fredme comes from the main author being fred t. hamster. we have since added a
33 # feistyme macro too, to be less personalized...
34 cat $FEISTY_MEOW_APEX/infobase/feisty_inits/dot.bashrc-root |
36 "s?FEISTY_MEOW_APEX=\".*\"?FEISTY_MEOW_APEX=\"$FEISTY_MEOW_APEX\"?" \
38 echo "Feisty Meow is now configured in '~/.bashrc' for the root user."