net-installer: initialize the git-cheetah submodule
[msysgit.git] / src / hexdump / release.sh
blob290ec82f49bd4d189da1764b834773f612791feb
1 #!/bin/sh
3 cd "$(dirname "$0")"
5 VERSION=1.6
6 DIR=hexdump-$VERSION
7 URL=http://catb.org/~esr/hexdump/$DIR.tar.gz
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 $DIR"
20 tar xzvf $FILE && (
21 cd $DIR &&
22 git init &&
23 git add . &&
24 git commit -m "Import of $FILE"
26 } || die "Could not check out $DIR"
28 test ! -d patches ||
29 test $(cd $DIR && git rev-list HEAD | wc -l) -gt 1 ||
30 (cd $DIR && git am ../patches/*) ||
31 die "Could not apply patches"
33 (cd $DIR &&
34 make &&
35 cp hexdump.exe /mingw/bin/ &&
36 cd / &&
37 git commit -s -m "Install $FILE" /mingw/bin/hexdump.exe
38 ) || die "Could not install $FILE"