Stop the analysis pass in Loopy's redraw routine from being
[sgt/puzzles] / makedist.sh
CommitLineData
54e5d4e7 1#!/bin/sh
2
eb935f91 3# Build a Unix source distribution from the Puzzles SVN area.
4#
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
8# archive at all.
9
10case "$#" in
11 0)
12 # Ignore errors; if we can't get a version, we'll have a blank
13 # string.
14 rev=`svnversion . 2>/dev/null`
15 if test "x$rev" = "xexported"; then rev=; fi
16 ;;
17 *)
9bb2f5af 18 case "$1" in *[!0-9M]*) echo "Malformed revision number '$1'">&2;exit 1;;esac
eb935f91 19 rev="$1"
20 ;;
21esac
22
23if test "x$rev" != "x"; then
24 arcsuffix="-r$rev"
25 ver="-DREVISION=$rev"
26else
27 arcsuffix=
28 ver=
29fi
30
54e5d4e7 31perl mkfiles.pl
32
33mkdir tmp.$$
eb935f91 34mkdir tmp.$$/puzzles$arcsuffix
2e77248a 35mkdir tmp.$$/puzzles$arcsuffix/icons
54e5d4e7 36
e91825f8 37# Build Windows Help and text versions of the manual for convenience.
38halibut --winhelp=puzzles.hlp --text=puzzles.txt puzzles.but
39
d0e5f156 40# Build a text version of the HACKING document.
10254186 41halibut --text=HACKING devel.but
d0e5f156 42
61234e85 43for i in *.c *.m *.h *.R *.rc *.but *.plist *.icns LICENCE README Recipe \
56c1f50e 44 *.rc2 mkfiles.pl Makefile Makefile.* \
1fd0d7c5 45 HACKING puzzles.txt puzzles.hlp puzzles.cnt puzzles.chm \
46 icons/Makefile icons/*.{sav,pl,sh} icons/win16pal.xpm \
47 icons/*.png icons/*.ico icons/*.rc icons/*.c; do
2e77248a 48 case $i in
49 */*) ln -s ../../../$i tmp.$$/puzzles$arcsuffix/$i;;
50 *) ln -s ../../$i tmp.$$/puzzles$arcsuffix/$i;;
51 esac
eb935f91 52 if test "x$ver" != "x"; then
53 md5sum $i >> tmp.$$/puzzles$arcsuffix/manifest
54 fi
54e5d4e7 55done
56
eb935f91 57if test "x$ver" != "x"; then
58 echo "$ver" >> tmp.$$/puzzles$arcsuffix/version.def
59fi
60
61tar -C tmp.$$ -chzf - puzzles$arcsuffix > ../puzzles$arcsuffix.tar.gz
54e5d4e7 62
63rm -rf tmp.$$