diff --git a/setup_cockpit.sh b/setup_cockpit.sh index 72ec537..a460e04 100755 --- a/setup_cockpit.sh +++ b/setup_cockpit.sh @@ -13,6 +13,8 @@ export GREEN export ORANGE export NC +base_dir="$PWD" + # Define OS {{{ @@ -36,7 +38,7 @@ case ${os_release,,} in echo "You are using Manjaro" ;; * ) - echo "${ORANGE}Didn't understand OS argument${NC}" + echo "${ORANGE}Unable to determine OS${NC}" echo "Which OS are you using?" select OS in 'Debian / Ubuntu' 'Arch / Manjaro'; do case $OS in @@ -115,6 +117,7 @@ git config --global alias.br "branch" if [ -e ~/.bash-git-prompt ]; then echo "Found existing bash-git-prompt, updating..." cd ~/.bash-git-prompt && git pull + cd "$base_dir" || exit 1 else echo "Cloning bash-git-prompt..." git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1