Git installer: create an annotated tag
[msysgit.git] / src / curl / release.sh
blobd7516cbf6e92af4de138ce405d88561fbe1e92a8
1 #!/bin/sh
3 cd "$(dirname "$0")"
5 VERSION=7.19.5
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 add . &&
24 git commit -m "Import of $FILE"
26 } || die "Could not check out cURL"
28 test $(cd $DIR && git rev-list HEAD | wc -l) -gt 1 ||
29 (cd $DIR && git am ../patches/*) ||
30 die "Could not apply patches"
32 (cd $DIR &&
33 ./configure --prefix=/mingw --with-ssl=/mingw &&
34 make &&
35 index=$(/share/msysGit/pre-install.sh) &&
36 make install &&
37 make ca-bundle &&
38 ls ../certs/*.pem 2>/dev/null |
39 while read pem
41 name=${pem%.pem}
42 name=${name##*/}
43 (printf "\n%s\n%s\n" "$name" "$(echo "$name" | sed 's/./=/g')" &&
44 cat $pem) >> lib/ca-bundle.crt || break
45 done &&
46 cp lib/ca-bundle.crt /mingw/bin/curl-ca-bundle.crt &&
47 /share/msysGit/post-install.sh $index "Install $FILE"
48 ) || die "Could not install $FILE"