Account for upstream separating the completion and prompt scripts
[msysgit.git] / src / hexdump / release.sh
blobeec8b4f34ffcb8fd3ab36e07016a7a91f3a6ff20
1 #!/bin/sh
3 cd "$(dirname "$0")"
5 VERSION=1.7
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 index=$(/share/msysGit/pre-install.sh) &&
36 cp hexdump.exe /mingw/bin/ &&
37 /share/msysGit/post-install.sh $index "Install $FILE"
38 ) || die "Could not install $FILE"