Add an error check for correct formatting in Deflate uncompressed
[sgt/halibut] / release.sh
1 #!/bin/sh
2
3 # Make a Halibut release archive.
4
5 RELDIR="$1"
6 VERSION="$2"
7
8 linkmirror() {
9 (cd "$1"; find . -name CVS -prune -o -name .svn -prune -o \
10 -name build -prune -o -name reltmp -prune -o -type d -print) | \
11 while read dir; do mkdir -p "$2"/"$dir"; done
12 (cd "$1"; find . -name CVS -prune -o -name .svn -prune -o \
13 -name build -prune -o -name reltmp -prune -o \
14 -name '*.orig' -prune -o -name '*.rej' -prune -o \
15 -name '*.txt' -prune -o -name '*.html' -prune -o \
16 -name '*.1' -prune -o -name '.cvsignore' -prune -o \
17 -name '*.gz' -prune -o -name '.[^.]*' -prune -o \
18 -type f -print) | \
19 while read file; do ln -s "$1"/"$file" "$2"/"$file"; done
20 }
21
22 linkmirror $PWD reltmp/$RELDIR
23 if ! test -d charset; then
24 linkmirror $PWD/../charset reltmp/$RELDIR/charset
25 fi
26
27 if test "x${VERSION}y" != "xy"; then
28 (cd reltmp/$RELDIR;
29 find . -name '*.[ch]' -exec md5sum {} \;
30 ) > reltmp/$RELDIR/manifest
31 echo "-DVERSION=\"${VERSION}\"" > reltmp/$RELDIR/version;
32 fi
33
34 tar chzvoCf reltmp $RELDIR.tar.gz $RELDIR
35
36 rm -rf reltmp