Ignore mingw-get's downloaded files
[msysgit.git] / src / curl / release.sh
blob6e73a92779cd589cd799e6a6fcd1480435f13ebf
1 #!/bin/sh
3 cd "$(dirname "$0")"
5 VERSION=7.21.1
6 DIR=curl-$VERSION
7 URL=http://curl.haxx.se/download/$DIR.tar.bz2
8 FILE=${URL##*/}
10 die () {
11 echo "$*" >&2
12 exit 1
15 test -d $DIR || {
16 test -f $FILE ||
17 curl -O $URL ||
18 die "Could not download cURL"
20 tar xjvf $FILE && (
21 cd $DIR &&
22 git init &&
23 git config core.autocrlf false &&
24 git add . &&
25 git commit -m "Import of $FILE"
27 } || die "Could not check out cURL"
29 test $(cd $DIR && git rev-list HEAD | wc -l) -gt 1 ||
30 (cd $DIR && git am ../patches/*) ||
31 die "Could not apply patches"
33 (cd $DIR &&
34 ./configure --prefix=/mingw --with-ssl=/mingw --enable-sspi &&
35 make &&
36 index=$(/share/msysGit/pre-install.sh) &&
37 make install &&
38 make ca-bundle &&
39 ls ../certs/*.pem 2>/dev/null |
40 while read pem
42 name=${pem%.pem}
43 name=${name##*/}
44 (printf "\n%s\n%s\n" "$name" "$(echo "$name" | sed 's/./=/g')" &&
45 cat $pem) >> lib/ca-bundle.crt || break
46 done &&
47 cp lib/ca-bundle.crt /mingw/bin/curl-ca-bundle.crt &&
48 /share/msysGit/post-install.sh $index "Install $FILE"
49 ) || die "Could not install $FILE"