WIP: fetch and make autoconf & friends
[msysgit.git] / src / autoconf / release.sh
blob8c7e75b50b0995e3151b869f8148480345168d03
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 -f $DIR/Makefile
23 then
24 (cd $DIR && ./configure --prefix=/mingw)
25 fi &&
26 if ! test -x $DIR/$TARGET
27 then
28 (cd $DIR && make)
29 fi &&
30 INDEX=$(/share/msysGit/pre-install.sh) &&
31 (cd $DIR && make install) &&
32 /share/msysGit/post-install.sh $INDEX Install $DIR ||
33 die "Failed to install $DIR"