3 # Build a Unix source distribution from the Puzzles SVN area.
5 # Pass a numeric argument to have the archive tagged as that SVN
6 # revision. Otherwise, the script will work it out itself by
7 # calling `svnversion', or failing that it will not version-tag the
12 # Ignore errors; if we can't get a version, we'll have a blank
14 rev=`svnversion . 2>/dev/null`
15 if test "x$rev" = "xexported"; then rev=; fi
18 case "$1" in *[!0-9]*) echo "Malformed revision number '$1'">&2;exit 1;;esac
23 if test "x$rev" != "x"; then
34 mkdir tmp.$$
/puzzles
$arcsuffix
36 # Build Windows Help and text versions of the manual for convenience.
37 halibut
--winhelp
=puzzles.hlp
--text
=puzzles.txt puzzles.but
39 # Build a text version of the HACKING document.
40 halibut
--text
=HACKING devel.but
42 for i
in *.c
*.m
*.h
*.R
*.but
*.plist
*.icns LICENCE README Recipe \
43 mkfiles.pl Makefile Makefile.
* \
44 HACKING puzzles.txt puzzles.hlp puzzles.cnt puzzles.chm \
45 icons
/Makefile icons
/*.
{sav
,pl
,sh
} icons
/win16pal.xpm \
46 icons
/*.png icons
/*.ico icons
/*.rc icons
/*.c
; do
47 ln -s ..
/..
/$i tmp.$$
/puzzles
$arcsuffix
48 if test "x$ver" != "x"; then
49 md5sum $i >> tmp.$$
/puzzles
$arcsuffix/manifest
53 if test "x$ver" != "x"; then
54 echo "$ver" >> tmp.$$
/puzzles
$arcsuffix/version.def
57 tar -C tmp.$$
-chzf
- puzzles
$arcsuffix > ..
/puzzles
$arcsuffix.
tar.gz