forked from msysgit/msysgit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
38 lines (31 loc) · 736 Bytes
/
release.sh
File metadata and controls
38 lines (31 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/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"