- #!/bin/bash
- set -e
- set -x
- for i in .git/refs/heads/*; do
- j=$(basename $i)
- git checkout $j;
- test ! -d common || rm -rf common
- git submodule add git://git.debian.org/~srivasta/debian-common.git common
- perl -pli~ -e 's,url = git.*$,url = ssh://srivasta@git.debian.org/~srivasta/public_git/debian-common.git,' common/.git/config
- git add .gitmodules common
- git commit -m "Add common submodule to branch $j"
- git status || true
- git submodule status
- echo -n sleeping...
- sleep 5
- echo .
- done
Raw Paste