inputrc: use the same double-Tab convention as on Linux/MacOSX
[msysgit.git] / src / curl / release.sh
blobd1e3fb4b8c0e180cd1c3969d039ade3f66521c04
1 #!/bin/sh
3 cd "$(dirname "$0")"
5 VERSION=7.41.0
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 cleanup_old_curl () {
16 for f in \
17 /mingw/bin/libcurl-4.dll \
18 /mingw/bin/curl-config \
19 /mingw/bin/libcurl.la
21 [ -f $f ] && rm -f $f
22 done
23 return 0
26 test -d $DIR || {
27 test -f $FILE ||
28 curl -O $URL ||
29 die "Could not download cURL"
31 tar xjvf $FILE && (
32 cd $DIR &&
33 git init &&
34 git config core.autocrlf false &&
35 git add . &&
36 git commit -n -m "Import of $FILE"
38 } || die "Could not check out cURL"
40 test $(cd $DIR && git rev-list HEAD | wc -l) -gt 1 ||
41 (cd $DIR && git am ../patches/*) ||
42 die "Could not apply patches"
44 (cd $DIR &&
45 CFG='-ssl-ipv6-zlib-sspi-spnego-ldaps' \
46 OPENSSL_PATH=/mingw \
47 OPENSSL_LIBPATH=/mingw/lib \
48 OPENSSL_LIBS='-lcrypto.dll -lssl.dll' \
49 make mingw32 &&
50 index=$(/share/msysGit/pre-install.sh) &&
51 cleanup_old_curl &&
52 /bin/install -m 0755 src/curl.exe /mingw/bin/curl.exe &&
53 /bin/install -m 0755 lib/libcurl.dll /mingw/bin/libcurl.dll &&
54 /bin/install -m 0755 lib/libcurl.a /mingw/lib/libcurl.a &&
55 /bin/install -m 0755 lib/libcurldll.a /mingw/lib/libcurl.dll.a &&
56 /bin/install -m 0644 include/curl/*.h /mingw/include/curl/ &&
57 make ca-bundle &&
58 ls ../certs/*.pem 2>/dev/null |
59 while read pem
61 name=${pem%.pem}
62 name=${name##*/}
63 (printf "\n%s\n%s\n" "$name" "$(echo "$name" | sed 's/./=/g')" &&
64 cat $pem) >> lib/ca-bundle.crt || break
65 done &&
66 cp lib/ca-bundle.crt /mingw/bin/curl-ca-bundle.crt &&
67 /share/msysGit/post-install.sh $index "Install $FILE"
68 ) || die "Could not install $FILE"