3 # Syncs with remote hosts in the git (sub)directories.
5 # Allows fetching (no merge) and pushing at the moment.
8 # Select the method, fetch and push is possible.
9 if [ x$1 = x -o x$1 = xfetch ]; then
11 elif [ x$1 = xpush ]; then
14 echo "Unsupported method '$1'. Only 'fetch' and 'push' is supported." >&2
18 # Fetch from/Push to each remote of each git subdirectory.
19 for project in `find . -name .git -type d`; do
20 if [ -d "$project" ]; then
24 # Fetch from/Push to all remotes.
25 for remote in `git remote`; do
26 echo "$project: ${method}ing $remote ..."