curl: add a script to install cURL from source
[msysgit.git] / src / curl / release.sh
blobe5aa44231f3dde40eed5c5560456411857d85e3b
1 #!/bin/sh
3 VERSION=7.19.5
4 DIR=curl-$VERSION
5 URL=http://curl.haxx.se/download/$DIR.tar.bz2
6 FILE=${URL##*/}
8 die () {
9 echo "$*" >&2
10 exit 1
13 test -d $DIR || {
14 test -f $FILE ||
15 curl -O $URL ||
16 die "Could not download cURL"
18 tar xjvf $FILE && (
19 cd $DIR &&
20 git init &&
21 git add . &&
22 git commit -m "Import of $FILE"
24 } || die "Could not check out cURL"
26 (cd $DIR &&
27 ./configure --prefix=/mingw --with-ssl=/mingw &&
28 make &&
29 index=$(/share/msysGit/pre-install.sh) &&
30 make install &&
31 /share/msysGit/post-install.sh $index "Install $FILE"
32 ) || die "Could not install $FILE"