Updated for Git 1.7.3.2
[msysgit/mtrensch.git] / share / msysGit / initialize.sh
blob135df737f1a9cd916cfe09484bcfe96da5655826
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 config core.autocrlf false &&
9 git remote add -f origin \
10 mob@repo.or.cz:/srv/git/git/mingw/4msysgit.git &&
11 if test ! -f /etc/full-git-sha1 ||
12 ! git reset $(cat /etc/full-git-sha1)
13 then
14 git add . &&
15 git commit -m "Current revision"
16 fi &&
17 git gc
18 } ||
19 exit
22 test -d /.git || {
23 cd / &&
24 git init &&
25 git config core.autocrlf false &&
26 git remote add -f origin mob@repo.or.cz:/srv/git/msysgit.git &&
27 if test ! -f /etc/full-msysgit-sha1 ||
28 ! git reset $(cat /etc/full-msysgit-sha1)
29 then
30 git ls-files --other --exclude-standard $(sed -n \
31 -e 's/^path = /--exclude=/p' < .gitmodules) -z |
32 git update-index --add -z --stdin &&
33 git commit -m "Current revision"
34 fi &&
35 git gc