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:
parent
d18d030d9a
commit
39a127e98d
@ -9,17 +9,17 @@ fi
|
|||||||
if [ ! -d "$HOME/dotfiles" ]; then
|
if [ ! -d "$HOME/dotfiles" ]; then
|
||||||
git clone git@github.com:thoughtbot/dotfiles.git
|
git clone git@github.com:thoughtbot/dotfiles.git
|
||||||
else
|
else
|
||||||
cd "$HOME/dotfiles"
|
pushd "$HOME/dotfiles"
|
||||||
git pull
|
git pull
|
||||||
cd -
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$HOME/dotfiles-local" ]; then
|
if [ ! -d "$HOME/dotfiles-local" ]; then
|
||||||
git clone git@github.com:danbee/dotfiles-local.git
|
git clone git@github.com:danbee/dotfiles-local.git
|
||||||
else
|
else
|
||||||
cd "$HOME/dotfiles-local"
|
pushd "$HOME/dotfiles-local"
|
||||||
git pull
|
git pull
|
||||||
cd -
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
env RCRC="$HOME/dotfiles/rcrc" rcup
|
env RCRC="$HOME/dotfiles/rcrc" rcup
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
export LDFLAGS="-L/usr/local/opt/zlib/lib"
|
export LDFLAGS="-L/usr/local/opt/zlib/lib"
|
||||||
export CPPFLAGS="-I/usr/local/opt/zlib/include"
|
export CPPFLAGS="-I/usr/local/opt/zlib/include"
|
||||||
|
|
||||||
cd "$HOME"
|
pushd "$HOME"
|
||||||
|
|
||||||
for tool in `awk -F " " '{print $1}' .tool-versions`; do
|
for tool in `awk -F " " '{print $1}' .tool-versions`; do
|
||||||
asdf plugin-add "$tool"
|
asdf plugin-add "$tool"
|
||||||
@ -15,4 +15,4 @@ done
|
|||||||
|
|
||||||
asdf install
|
asdf install
|
||||||
|
|
||||||
cd -
|
popd
|
||||||
|
|||||||
4
setup.sh
4
setup.sh
@ -44,9 +44,9 @@ fi
|
|||||||
if [ ! -d "$MAC_SETUP_DIR" ]; then
|
if [ ! -d "$MAC_SETUP_DIR" ]; then
|
||||||
git clone git@github.com:danbee/mac-setup.git "$HOME/mac-setup"
|
git clone git@github.com:danbee/mac-setup.git "$HOME/mac-setup"
|
||||||
else
|
else
|
||||||
cd "$MAC_SETUP_DIR"
|
pushd "$MAC_SETUP_DIR"
|
||||||
git pull
|
git pull
|
||||||
cd -
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install brew bundles
|
# Install brew bundles
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user