dotfiles/run_once_clone-repos.sh

24 lines
962 B
Bash
Raw Normal View History

2021-02-15 21:20:53 -05:00
#! /bin/bash
## This script pulls all my git repos that I use in my config. It will only pull
## them if they don't exist. Rather than use the import approach suggested in
## the chezmoi howto, this doesn't require me to keep 'syncing' changes when I
## work in these repos directly. The tradeoff is that it will only pull the
## latest master, which is totally fine with me.
2021-02-15 21:20:53 -05:00
clone_maybe () {
2021-02-15 21:26:15 -05:00
if [ ! -d "$2" ]; then
2021-02-15 21:20:53 -05:00
echo cloning git repo: "$1"
git clone --recurse-submodules "$1" "$2"
else
echo git repo already exists: "$1"
fi
}
2021-02-15 21:26:15 -05:00
clone_maybe https://github.com/ndwarshuis/conky.git "$HOME/.config/conky"
2021-02-15 21:20:53 -05:00
clone_maybe https://github.com/ndwarshuis/.emacs.d.git "$HOME/.config/emacs"
clone_maybe https://github.com/ndwarshuis/rofi-extras.git "$HOME/.config/rofi-extras"
clone_maybe https://github.com/ndwarshuis/xman.git "$HOME/.config/xman"
2021-02-15 21:26:15 -05:00
clone_maybe https://github.com/ndwarshuis/xmonad-config.git "$HOME/.config/xmonad"
2021-02-15 21:20:53 -05:00