From 75c8935f305ac607b076b3a112b79bd464e7a45d Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 11 Jun 2015 10:02:09 -0400 Subject: [PATCH] bootstrap: set push-urls for main repo and prezto on first run also add upstream url for prezto --- bootstrap.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 1a51dcd..2f62cd1 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,14 +1,22 @@ #!/bin/bash +firstRun=0 +[ "$1" == "-f" ] && firstRun=1 + cd ~ if [ ! -d ".dotfiles" ] then git clone http://adamgoldsmith.name/cgit/dotfiles.git .dotfiles + firstRun=1 else echo "~/.dotfiles already exists, not cloning" fi echo "Updating .dotfiles" +if [ $firstRun -eq 1 ] +then + git remote set-url --push origin ssh://adamgoldsmith.name:443/srv/git/dotfiles.git +fi cd .dotfiles git pull git submodule init @@ -16,6 +24,11 @@ git submodule update echo "Updating .dotfiles/zsh/.zprezto" cd zsh/.zprezto/ +if [ $firstRun -eq 1 ] +then + git remote set-url --push origin ssh://adamgoldsmith.name:443/srv/git/prezto.git + git remote add upstream https://github.com/sorin-ionescu/prezto.git +fi git submodule init git submodule update