37 lines
1.2 KiB
Bash
Executable File
37 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
RC_DIR='$HOME/.wryn'
|
|
|
|
[ ! -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;
|
|
|
|
LOCAL_DIR_SETUP="$HOME/.my_bash_env"
|
|
if [ ! -f "$LOCAL_DIR_SETUP" ]; then
|
|
touch "$LOCAL_DIR_SETUP";
|
|
echo '#!/bin/bash' >> $LOCAL_DIR_SETUP
|
|
echo 'RD_PATH="$HOME/RentDynamics";' >> $LOCAL_DIR_SETUP
|
|
echo 'SCHOOL_DIR="$HOME/School";' >> $LOCAL_DIR_SETUP
|
|
echo 'DOTWRYN="$HOME/.wryn";' >> $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=expand("$HOME/.wryn")' >> $LOCAL_VIM_SETUP
|
|
echo 'let $VIM_DIR=expand("$RC_DIR/vim")' >> $LOCAL_VIM_SETUP
|
|
echo 'let $WRYNVIMRC=expand("$VIM_DIR/rc.vim")' >> $LOCAL_VIM_SETUP
|
|
echo 'let $WRYNBASH=expand("$RC_DIR/bashrc")' >> $LOCAL_VIM_SETUP
|
|
echo 'let $MYBASHRC=expand("$HOME/.bashrc")' >> $LOCAL_VIM_SETUP
|
|
else
|
|
echo 'vim environment variables already set up'
|
|
fi
|