3 # Build a Unix source distribution from the PuTTY CVS area.
5 # Pass an argument of the form `2004-02-08' to have the archive
6 # tagged as a development snapshot; of the form `0.54' to have it
7 # tagged as a release; of the form `r1234' to have it tagged as a
8 # custom build. Otherwise it'll be tagged as unidentified.
12 case "$1" in *[!-0-9]*) echo "Malformed snapshot ID '$1'" >&2;exit 1;;esac
13 arcsuffix="-`cat LATEST.VER`-$1"
28 case "$1" in *[!.0-9a-z]*) echo "Malformed release ID '$1'">&2;exit 1;;esac
31 docver="VERSION=\"PuTTY release $1\""
36 (cd doc && make -s ${docver:+"$docver"})
37 sh mkauto.sh 2>/dev/null
39 relver=`cat LATEST.VER`
40 arcname="putty$arcsuffix"
43 find . -name uxarc -prune -o \
45 -name .svn -prune -o \
47 -type d -exec mkdir uxarc/$arcname/{} \;
48 find . -name uxarc -prune -o \
50 -name .cvsignore -prune -o \
51 -name .svn -prune -o \
52 -name '*.zip' -prune -o \
53 -name '*.tar.gz' -prune -o \
54 -type f -exec ln -s $PWD/{} uxarc/$arcname/{} \;
55 if test "x$ver" != "x"; then
57 md5sum `find . -name '*.[ch]' -print` > manifest;
58 echo "$ver" > version.def)
60 tar -C uxarc -chzof $arcname.tar.gz $arcname