bootstrap: set push-urls for main repo and prezto on first run
also add upstream url for prezto
This commit is contained in:
parent
30302071a5
commit
75c8935f30
13
bootstrap.sh
13
bootstrap.sh
@ -1,14 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
firstRun=0
|
||||||
|
[ "$1" == "-f" ] && firstRun=1
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
if [ ! -d ".dotfiles" ]
|
if [ ! -d ".dotfiles" ]
|
||||||
then
|
then
|
||||||
git clone http://adamgoldsmith.name/cgit/dotfiles.git .dotfiles
|
git clone http://adamgoldsmith.name/cgit/dotfiles.git .dotfiles
|
||||||
|
firstRun=1
|
||||||
else
|
else
|
||||||
echo "~/.dotfiles already exists, not cloning"
|
echo "~/.dotfiles already exists, not cloning"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Updating .dotfiles"
|
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
|
cd .dotfiles
|
||||||
git pull
|
git pull
|
||||||
git submodule init
|
git submodule init
|
||||||
@ -16,6 +24,11 @@ git submodule update
|
|||||||
|
|
||||||
echo "Updating .dotfiles/zsh/.zprezto"
|
echo "Updating .dotfiles/zsh/.zprezto"
|
||||||
cd 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 init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user