Bug in utoi(), which made it ignore a leading minus sign when
[sgt/halibut] / release.sh
CommitLineData
dc69abf1 1#!/bin/sh
2
3# Make a Halibut release archive.
4
5RELDIR="$1"
6VERSION="$2"
7
8linkmirror() {
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
22linkmirror $PWD reltmp/$RELDIR
23if ! test -d charset; then
24 linkmirror $PWD/../charset reltmp/$RELDIR/charset
25fi
26
27if 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;
32fi
33
34tar chzvoCf reltmp $RELDIR.tar.gz $RELDIR
35
36rm -rf reltmp