Browse Source

Update setup.sh to run from anywhere

Git submodule cloning was the last action that needed the script to be
run from within the dotfiles folder. Now, that part runs in its own
subshell that changes to the dotfiles folder context, allowing setup.sh
to be run from anywhere e.g. `~/dotfiles/setup.sh` instead of only
`./setup.sh`
Weiyi Lou 10 years ago
parent
commit
11a6906597
1 changed files with 1 additions and 2 deletions
  1. 1 2
      setup.sh

+ 1 - 2
setup.sh

@@ -51,8 +51,7 @@ git config --global diff.mnemonicPrefix true
 echo "Git config done."
 
 # Initialise and clone any submodules
-git submodule sync
-git submodule update --init
+(cd ~/dotfiles && git submodule sync && git submodule update --init)
 echo "Submodules done."
 
 # Zsh