X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Fconnect_feisty_meow.sh;fp=scripts%2Fcore%2Fconnect_feisty_meow.sh;h=9a5c81d548bb3b98b6b22e36a3009641f6cdb868;hb=7b39f7e279005c8466ef508220a532ce2aa4abf8;hp=0000000000000000000000000000000000000000;hpb=3fbd372b35b15a19fb171d5ae34294ff7b1e6485;p=feisty_meow.git diff --git a/scripts/core/connect_feisty_meow.sh b/scripts/core/connect_feisty_meow.sh new file mode 100644 index 00000000..9a5c81d5 --- /dev/null +++ b/scripts/core/connect_feisty_meow.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Author: Chris Koeritz + +# this script adds the feisty inits code to .bashrc, if we think it has not yet been added. + +# auto-locate the feisty meow scripts, since they supposedly are not enabled yet. +export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. +# normalize the path we want to cobble together. +export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )" + +echo calculated apex as $FEISTY_MEOW_APEX + +if [ -f "$HOME/.bashrc" ] && grep -q "launch_feisty_meow.sh" "$HOME/.bashrc"; then + # the stanza for loading feisty meow already seems to be present. + echo "Feisty Meow already seems to be configured in '~/.bashrc'." +else + # stuff the normal user init file into .bashrc. not appropriate for root probably, but + # this is the easy quick start script for normal folks. + cat $FEISTY_MEOW_APEX/infobase/feisty_inits/dot.bashrc-normal-user | + sed -e \ + "s?FEISTY_MEOW_APEX=\".*\"?FEISTY_MEOW_APEX=\"$FEISTY_MEOW_APEX\"?" \ + >> "$HOME/.bashrc" + echo "Feisty Meow is now configured in '~/.bashrc'." +fi +