Add cd back after git pull

This commit is contained in:
flyingscorpio@pinebook-pro 2020-03-19 11:22:39 +01:00
parent e7e1c8af01
commit 7c927e997e

View file

@ -13,6 +13,8 @@ export GREEN
export ORANGE export ORANGE
export NC export NC
base_dir="$PWD"
# Define OS {{{ # Define OS {{{
@ -36,7 +38,7 @@ case ${os_release,,} in
echo "You are using Manjaro" 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?" echo "Which OS are you using?"
select OS in 'Debian / Ubuntu' 'Arch / Manjaro'; do select OS in 'Debian / Ubuntu' 'Arch / Manjaro'; do
case $OS in case $OS in
@ -115,6 +117,7 @@ git config --global alias.br "branch"
if [ -e ~/.bash-git-prompt ]; then if [ -e ~/.bash-git-prompt ]; then
echo "Found existing bash-git-prompt, updating..." echo "Found existing bash-git-prompt, updating..."
cd ~/.bash-git-prompt && git pull cd ~/.bash-git-prompt && git pull
cd "$base_dir" || exit 1
else else
echo "Cloning bash-git-prompt..." echo "Cloning bash-git-prompt..."
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1 git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1