From e7e1c8af0119ee2716972cd68a0cbed7cdbde7d6 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@pinebook-pro" Date: Thu, 19 Mar 2020 11:18:09 +0100 Subject: [PATCH] Add bash-git-prompt --- setup_cockpit.sh | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/setup_cockpit.sh b/setup_cockpit.sh index 98c0732..72ec537 100755 --- a/setup_cockpit.sh +++ b/setup_cockpit.sh @@ -69,10 +69,23 @@ fi # }}} +# Update .bashrc {{{ + +echo "Updating .bashrc..." +if cp ~/SetupCockpit/dotfiles/bashrc ~/.bashrc; then + echo "${GREEN}Successfully updated .bashrc${NC}" +else + echo "${ORANGE}There was a problem while updating .bashrc${NC}" +fi + +/bin/bash ~/SetupCockpit/separator.sh + +# }}} + # Update .bash_aliases {{{ echo "Updating .bash_aliases..." -if cp ~/SetupCockpit/bash_aliases ~/.bash_aliases; then +if cp ~/SetupCockpit/dotfiles/bash_aliases ~/.bash_aliases; then echo "${GREEN}Successfully updated .bash_aliases${NC}" else echo "${ORANGE}There was a problem while updating .bash_aliases${NC}" @@ -97,6 +110,20 @@ git config --global alias.br "branch" # }}} +# Clone bash-git-prompt {{{ + +if [ -e ~/.bash-git-prompt ]; then + echo "Found existing bash-git-prompt, updating..." + cd ~/.bash-git-prompt && git pull +else + echo "Cloning bash-git-prompt..." + git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1 +fi + +/bin/bash ~/SetupCockpit/separator.sh + +# }}} + # Add MIME type for reading .md files in Firefox (need to add extension too) {{{ echo "Adding MIME type for .md files in Firefox..."