From 30ebdeee6e7bf7e11cf02a00e9d5dd7eb4876f96 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 23 Jul 2017 14:07:56 +0200 Subject: [PATCH] bootstrap: add option to configure bashrc --- bootstrap.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 9029c58b..2f9f6ec5 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -193,6 +193,24 @@ install(){ done fi + if ! grep /etc/static/bashrc /etc/bashrc &> /dev/null; then + while true; do + read -p "Would you like to configure /etc/bashrc? [y/n] " ANSWER + case $ANSWER in + y|Y) + echo 'if test -e /etc/static/bashrc; then . /etc/static/bashrc; fi' | sudo tee -a /etc/bashrc + break + ;; + n|N) + break + ;; + *) + echo "Please answer 'y' or 'n'..." + ;; + esac + done + fi + # Finish echo -e ""$GREEN"You're all done!"$ESC"" echo -e "Take a look at "$YELLOW"~/.nixpkgs/darwin-configuration.nix"$ESC" to get started."