We moved to github.com
[msysgit.git] / share / msysGit / initialize.sh
blobd20b598ff00da7aff45d67f98fb04d3f3593bbb6
1 #!/bin/sh
3 # This script initializes /.git from msysgit/msysgit on github.com
5 test -d /git/.git || {
6 cd /git &&
7 git init &&
8 git config core.autocrlf false &&
9 git remote add -f origin \
10 git://github.com/msysgit/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 git://github.com/msysgit/msysgit &&
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