#!/bin/bash [ ! -f "$HOME/.bashrc" ] && touch "$HOME/.bashrc"; [ ! -f "$HOME/.vimrc" ] && touch "$HOME/.vimrc"; [ ! -d "$HOME/.config" ] && mkdir "$HOME/.config"; [ ! -d "$HOME/.config/wryn" ] && mkdir "$HOME/.config/wryn"; # Source RCs grep '.wryn' $HOME/.bashrc >/dev/null 2>/dev/null \ && echo already set up bash rc \ || echo source $HOME/.wryn/bash/rc >> $HOME/.bashrc; grep '.wryn' $HOME/.vimrc >/dev/null 2>/dev/null \ && echo already set up vim rc \ || echo source $HOME/.wryn/vim/rc.vim >> $HOME/.vimrc; grep '.wryn' $HOME/.zshrc >/dev/null 2>/dev/null \ && echo already set up zsh rc \ || echo source $HOME/.wryn/zsh/rc >> $HOME/.zshrc; # setup local environments which sh >/dev/null && "$HOME/.wryn/env/env.sh"; which bash >/dev/null && "$HOME/.wryn/env/env.bash"; which zsh >/dev/null && "$HOME/.wryn/env/env.zsh"; LOCAL_VIM_ENV="$HOME/.config/wryn/env.vim" [ ! -f "$LOCAL_VIM_ENV" ] \ && { touch "$LOCAL_VIM_ENV"; which google-chrome-stable \ && echo 'let $WEBBROWSER="'$(which google-chrome-stable)'"' >> $LOCAL_VIM_ENV\ || echo 'let $WEBBROWSER=""' >> $LOCAL_VIM_ENV; } || { echo 'vim environment variables already set up' }