Teach share/msysGit/initialize.sh about submodules
[msysgit.git] / share / msysGit / initialize.sh
blob938ae0efc1c0b2895294ec87bbb399f79ffa81a3
1 #!/bin/sh
3 # This script initializes /.git from msysgit.git on repo.or.cz
5 test -d /git/.git || {
6 cd /git &&
7 git init &&
8 git add . &&
9 git commit -m "Current revision" &&
10 git remote add -f origin mob@repo.or.cz:/srv/git/git/mingw/4msysgit.git
11 } ||
12 exit
15 test -d /.git || {
16 cd / &&
17 git init &&
18 git ls-files --other --exclude-standard $(sed -n \
19 -e 's/^path = /--exclude=/p' < .gitmodules) -z |
20 git update-index --add --stdin -z &&
21 git commit -m "Current revision" &&
22 git remote add -f origin mob@repo.or.cz:/srv/git/4msysgit.git &&
23 git gc