2019-04-16 16:33:57 +00:00
|
|
|
#!/bin/bash
|
2019-04-17 02:24:37 +00:00
|
|
|
RC_DIR='$HOME/.wryn'
|
2019-09-17 01:42:08 +00:00
|
|
|
|
|
|
|
[ ! -f "$HOME/.bashrc" ] && touch "$HOME/.bashrc";
|
|
|
|
[ ! -f "$HOME/.vimrc" ] && touch "$HOME/.vimrc";
|
|
|
|
|
|
|
|
grep '.wryn' $HOME/.bashrc >/dev/null 2>/dev/null \
|
|
|
|
&& echo already set up bash rc \
|
|
|
|
|| echo source $RC_DIR/bash/rc >> $HOME/.bashrc;
|
|
|
|
|
|
|
|
grep '.wryn' $HOME/.vimrc >/dev/null 2>/dev/null \
|
|
|
|
&& echo already set up vim rc \
|
|
|
|
|| echo source $RC_DIR/vim/rc.vim >> $HOME/.vimrc;
|
|
|
|
|
2019-09-17 16:41:04 +00:00
|
|
|
LOCAL_DIR_SETUP="$HOME/.my_bash_env"
|
2019-09-17 01:42:08 +00:00
|
|
|
if [ ! -f "$LOCAL_DIR_SETUP" ]; then
|
|
|
|
touch "$LOCAL_DIR_SETUP";
|
|
|
|
echo '#!/bin/bash' >> $LOCAL_DIR_SETUP
|
2019-09-17 16:41:04 +00:00
|
|
|
echo 'RD_PATH="$HOME/RentDynamics";' >> $LOCAL_DIR_SETUP
|
|
|
|
echo 'SCHOOL_DIR="$HOME/School";' >> $LOCAL_DIR_SETUP
|
|
|
|
else
|
|
|
|
echo 'bash environment variables already set up'
|
|
|
|
fi
|
|
|
|
|
|
|
|
LOCAL_VIM_SETUP="$HOME/.my_vim_env"
|
|
|
|
if [ ! -f "$LOCAL_VIM_SETUP" ]; then
|
|
|
|
touch "$LOCAL_VIM_SETUP";
|
|
|
|
echo 'let $RC_DIR="$HOME/.wryn"' >> $LOCAL_VIM_SETUP
|
|
|
|
echo 'let $VIM_DIR="$RC_DIR/vim"' >> $LOCAL_VIM_SETUP
|
|
|
|
echo 'let $WRYNVIMRC="$VIM_DIR/rc.vim"' >> $LOCAL_VIM_SETUP
|
|
|
|
echo 'let $WRYNBASH="$RC_DIR/bashrc"' >> $LOCAL_VIM_SETUP
|
|
|
|
echo 'let $MYBASHRC="$HOME/.bashrc"' >> $LOCAL_VIM_SETUP
|
|
|
|
else
|
|
|
|
echo 'vim environment variables already set up'
|
2019-09-17 01:42:08 +00:00
|
|
|
fi
|