amend.release.autoconf
[msysgit.git] / src / autoconf / release.sh
blob4a2969819ee8a3deac8566fab1ad071152c4ef81
1 #!/bin/sh
3 die () {
4 echo "$*" >&2
5 exit 1
8 test -z "$URL" && die "Need URL"
9 test -z "$TARGET" && die "Need TARGET"
11 TAR=${URL##*/}
12 DIR=${TAR%.tar.bz2}
14 if ! test -s $TAR
15 then
16 curl $URL > $TAR
17 fi &&
18 if ! test -d $DIR
19 then
20 tar xjvf $TAR
21 fi &&
22 if ! test -d $DIR/.git
23 then
24 (cd $DIR && git init && git add . && git commit -m initial)
25 fi &&
26 if ! test -f $DIR/Makefile
27 then
28 (cd $DIR && ./configure --prefix=/mingw)
29 fi &&
30 if ! test -x $DIR/$TARGET
31 then
32 (cd $DIR && make)
33 fi &&
34 INDEX=$(/share/msysGit/pre-install.sh) &&
35 (cd $DIR && make install) &&
36 /share/msysGit/post-install.sh $INDEX Install $DIR ||
37 die "Failed to install $DIR"