Missed options off mput help
[u/mdw/putty] / mkunxarc.sh
CommitLineData
8b4e077f 1#!/bin/sh
2
3# Build a Unix source distribution from the PuTTY CVS area.
4#
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.
8
9case "$1" in
10 ????-??-??)
11 case "$1" in *[!-0-9]*) echo "Malformed snapshot ID '$1'" >&2;exit 1;;esac
12 arcsuffix="-`cat LATEST.VER`-$1"
13 ver="-DSNAPSHOT=$1"
14 ;;
15 '')
16 arcsuffix=
17 ver=
18 ;;
19 *)
20 case "$1" in *[!.0-9a-z]*) echo "Malformed release ID '$1'">&2;exit 1;;esac
21 arcsuffix="-$1"
22 ver="-DRELEASE=$1"
23 ;;
24esac
25
26perl mkfiles.pl
fd37bee3 27(cd doc && make -s)
8b4e077f 28
29relver=`cat LATEST.VER`
30arcname="putty$arcsuffix"
31mkdir uxarc
32mkdir uxarc/$arcname
2ce79856 33find . -name uxarc -prune -o \
34 -name CVS -prune -o \
35 -name .svn -prune -o \
36 -name . -o \
8b4e077f 37 -type d -exec mkdir uxarc/$arcname/{} \;
38find . -name uxarc -prune -o \
39 -name CVS -prune -o \
40 -name .cvsignore -prune -o \
4494be0a 41 -name .svn -prune -o \
8b4e077f 42 -name '*.zip' -prune -o \
43 -name '*.tar.gz' -prune -o \
44 -type f -exec ln -s $PWD/{} uxarc/$arcname/{} \;
45if test "x$ver" != "x"; then
46 (cd uxarc/$arcname;
47 md5sum `find . -name '*.[ch]' -print` > manifest;
48 echo "$ver" > version.def)
49fi
a8a420c5 50tar -C uxarc -chzof $arcname.tar.gz $arcname
8b4e077f 51rm -rf uxarc