Add script to compile/install/distribute antiword
[msysgit.git] / src / antiword / release.sh
blob31a40cd44db31f6b6f6cf50df71a81a60d0b3aaa
1 #!/bin/sh
3 cd "$(dirname "$0")"
5 REPO=git://repo.or.cz/antiword.git
6 DIR=antiword-git
7 HEAD=0680e7ee62e430e0905085e5b4cfb01d31db5936 # antiword 0.37
9 die () {
10 echo "$*" >&2
11 exit 1
14 test -d $DIR ||
15 ( git clone -n $REPO $DIR && cd $DIR && git checkout $HEAD ) ||
16 die "Could not clone $REPO"
18 (cd $DIR && git am ../patches/*) ||
19 die "Could not apply patches"
21 (cd $DIR &&
22 make -f Makefile.Linux antiword.exe &&
23 index=$(/share/msysGit/pre-install.sh) &&
24 make -f Makefile.Linux global_install &&
25 /share/msysGit/post-install.sh $index "Install antiword (Git $HEAD)"
26 ) || die "Could not install antiword"