/src/curl/release.sh: make sure to cd to the correct directory first
[git/jnareb-git.git] / src / curl / release.sh
blobf108560cbba2b034c56802bbdbd843030292e102
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 (cd $DIR &&
29 ./configure --prefix=/mingw --with-ssl=/mingw &&
30 make &&
31 index=$(/share/msysGit/pre-install.sh) &&
32 make install &&
33 /share/msysGit/post-install.sh $index "Install $FILE"
34 ) || die "Could not install $FILE"