blob: 9c79cb4000d695d4f3d3040a5b1723e8b67af33b [file] [log] [blame]
#!/bin/sh
cd "$(dirname "$0")"
VERSION=1.2.4
DIR=gzip-$VERSION
URL=ftp://ftp.cs.tu-berlin.de/pub/gnu/gzip/$DIR.tar.gz
FILE=${URL##*/}
die () {
echo "$*" >&2
exit 1
}
test -d $DIR || {
test -f $FILE ||
curl -O $URL ||
die "Could not download $FILE"
tar xzvf $FILE && (
cd $DIR &&
git init &&
git add . &&
git commit -m "Import of $FILE"
)
} || die "Could not check out $FILE"
test $(cd $DIR && git rev-list HEAD | wc -l) -gt 1 ||
(cd $DIR && git am ../patches/*) ||
die "Could not apply patches"
(cd $DIR &&
INSTALL=/bin/install ./configure --prefix=/mingw &&
make &&
index=$(/share/msysGit/pre-install.sh) &&
make install &&
/share/msysGit/post-install.sh $index "Install $FILE"
) || die "Could not install $FILE"