1
0
mirror of https://github.com/danbee/mac-setup synced 2025-03-04 08:39:10 +00:00

Use pushd and popd instead of relying on cd -

This commit is contained in:
Daniel Barber 2019-06-13 17:55:45 -04:00 committed by Daniel Barber
parent d18d030d9a
commit 39a127e98d
3 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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