2015-04-27 20:05:38 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-06-11 10:02:09 -04:00
|
|
|
firstRun=0
|
|
|
|
[ "$1" == "-f" ] && firstRun=1
|
|
|
|
|
2015-04-27 20:05:38 -04:00
|
|
|
cd ~
|
|
|
|
if [ ! -d ".dotfiles" ]
|
|
|
|
then
|
2015-09-05 12:23:25 -04:00
|
|
|
git clone http://adamgoldsmith.name/cgit/bootstrap.git .dotfiles
|
2015-06-11 10:02:09 -04:00
|
|
|
firstRun=1
|
2015-04-27 20:05:38 -04:00
|
|
|
else
|
|
|
|
echo "~/.dotfiles already exists, not cloning"
|
|
|
|
fi
|
|
|
|
|
2015-06-11 10:10:37 -04:00
|
|
|
cd .dotfiles
|
2015-06-11 10:02:09 -04:00
|
|
|
if [ $firstRun -eq 1 ]
|
|
|
|
then
|
2015-09-05 12:23:25 -04:00
|
|
|
git remote set-url origin http://adamgoldsmith.name/cgit/bootstrap.git
|
|
|
|
git remote set-url --push origin ssh://adamgoldsmith.name:443/srv/git/bootstrap.git
|
|
|
|
else
|
|
|
|
echo "Updating .dotfiles"
|
|
|
|
git pull
|
2015-06-11 10:02:09 -04:00
|
|
|
fi
|
2015-09-05 12:23:25 -04:00
|
|
|
|
|
|
|
echo "Getting emacs, zsh, and git"
|
|
|
|
for i in emacs zsh git
|
|
|
|
do
|
|
|
|
git clone "http://adamgoldsmith.name/cgit/dotfiles/$i.git"
|
|
|
|
cd $i
|
|
|
|
git remote set-url origin http://adamgoldsmith.name/cgit/dotfiles/$i.git
|
|
|
|
git remote set-url --push origin ssh://adamgoldsmith.name:443/srv/git/dotfiles/$i.git
|
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "getting prezto"
|
|
|
|
cd zsh
|
2015-04-27 20:05:38 -04:00
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
|
|
|
|
echo "Updating .dotfiles/zsh/.zprezto"
|
2015-09-05 12:23:25 -04:00
|
|
|
cd .zprezto
|
2015-06-11 10:02:09 -04:00
|
|
|
if [ $firstRun -eq 1 ]
|
|
|
|
then
|
2015-06-11 10:10:37 -04:00
|
|
|
git remote set-url origin http://adamgoldsmith.name/cgit/prezto.git
|
2015-06-11 10:02:09 -04:00
|
|
|
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
|
2015-04-27 20:05:38 -04:00
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
|
|
|
|
echo "Stowing emacs, zsh, and git"
|
|
|
|
cd ~/.dotfiles/
|
|
|
|
stow emacs zsh git
|