]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - sync.sh
Add sync.sh which fetches all remote branches.
[config/dotfiles.git] / sync.sh
1 #!/bin/sh
2
3 # Fetches the current master from all remotes. Used to sync with all remote
4 # hosts. No merging is done.
5
6
7 # Fetch from each remote of each git subdirectory.
8 for project in `find . -name .git -type d`; do
9     if [ -d "$project" ]; then
10         pwd=`pwd`
11         cd "$project"
12
13         # Fetch from all remotes.
14         for remote in `git remote`; do
15             echo "$project: fetching $remote ..."
16             git fetch "$remote"
17         done
18
19         cd "$pwd"
20     fi
21 done