diff --git a/lib/dotfiles.sh b/lib/dotfiles.sh index 98fae75..c069035 100755 --- a/lib/dotfiles.sh +++ b/lib/dotfiles.sh @@ -9,17 +9,17 @@ fi if [ ! -d "$HOME/dotfiles" ]; then git clone git@github.com:thoughtbot/dotfiles.git else - cd "$HOME/dotfiles" + pushd "$HOME/dotfiles" git pull - cd - + popd fi if [ ! -d "$HOME/dotfiles-local" ]; then git clone git@github.com:danbee/dotfiles-local.git else - cd "$HOME/dotfiles-local" + pushd "$HOME/dotfiles-local" git pull - cd - + popd fi env RCRC="$HOME/dotfiles/rcrc" rcup diff --git a/lib/tools.sh b/lib/tools.sh index 30592f5..2eb9a57 100755 --- a/lib/tools.sh +++ b/lib/tools.sh @@ -3,7 +3,7 @@ export LDFLAGS="-L/usr/local/opt/zlib/lib" export CPPFLAGS="-I/usr/local/opt/zlib/include" -cd "$HOME" +pushd "$HOME" for tool in `awk -F " " '{print $1}' .tool-versions`; do asdf plugin-add "$tool" @@ -15,4 +15,4 @@ done asdf install -cd - +popd diff --git a/setup.sh b/setup.sh index db0aed1..fa5781a 100755 --- a/setup.sh +++ b/setup.sh @@ -44,9 +44,9 @@ fi if [ ! -d "$MAC_SETUP_DIR" ]; then git clone git@github.com:danbee/mac-setup.git "$HOME/mac-setup" else - cd "$MAC_SETUP_DIR" + pushd "$MAC_SETUP_DIR" git pull - cd - + popd fi # Install brew bundles