bootstrap/getter.sh

30 lines
478 B
Bash
Raw Normal View History

#!/bin/bash
stow=0
if [ "$1" = "-s" ]
then
stow=1
shift
fi
targets="$@"
for t in $targets
do
if [ -d "$t" ]
then
echo "$t already exists, not getting"
else
echo "Getting $t"
2018-09-04 14:13:04 -04:00
git clone "http://adamgoldsmith.name/cgit/dotfiles/$t.git" --recurse-submodules
cd $t
git remote set-url origin http://adamgoldsmith.name/cgit/dotfiles/$t.git
2016-04-14 22:02:41 -04:00
git remote set-url --push origin ag:/srv/git/dotfiles/$t.git
cd ..
fi
done
if [ "$stow" -eq 1 ]
then
./stower.sh "$@"
fi