#!/usr/bin/env bash repo="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd )" read -p " Would you like to use template from this repository as your .bashrc? WARNING: if you do, the existing ~/.bashrc will be deleted! [y/n]: " response if [[ $response == [y,Y]* ]] then cp "$repo/.bashrc_template" "$HOME/.bashrc" echo 'Installed .bashrc' else echo 'Not installing .bashrc' fi read -p " Would you like to include git options from this repo into ~/.gitconfig? [y/n]: " response if [[ $response == [y,Y]* ]] then echo "[Include] path=$repo/.gitopts " >> "$HOME/.gitconfig" echo "Included git options into ~/.gitconfig" else echo "Not including git options into ~/.gitconfig" fi for another_rc in \ .inputrc \ .screenrc do read -p " Would you like to use the $another_rc from this repo? WARNING: if you do, the existing ~/$another_rc will be deleted! [y/n]: " response if [[ $response == [y,Y]* ]] then ln -sf "$repo/$another_rc" "$HOME/$another_rc" echo "Installed $another_rc" else echo "Not installing $another_rc" fi done