2011-07-17 22:17:53 +00:00
|
|
|
#!/bin/bash
|
2004-02-07 18:14:53 +00:00
|
|
|
|
|
|
|
# Build a Unix source distribution from the PuTTY CVS area.
|
|
|
|
#
|
|
|
|
# Pass an argument of the form `2004-02-08' to have the archive
|
|
|
|
# tagged as a development snapshot; of the form `0.54' to have it
|
2007-02-05 12:49:24 +00:00
|
|
|
# tagged as a release; of the form `r1234' to have it tagged as a
|
|
|
|
# custom build. Otherwise it'll be tagged as unidentified.
|
2004-02-07 18:14:53 +00:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
????-??-??)
|
|
|
|
case "$1" in *[!-0-9]*) echo "Malformed snapshot ID '$1'" >&2;exit 1;;esac
|
|
|
|
arcsuffix="-`cat LATEST.VER`-$1"
|
|
|
|
ver="-DSNAPSHOT=$1"
|
2007-02-05 12:49:24 +00:00
|
|
|
docver=
|
|
|
|
;;
|
|
|
|
r*)
|
|
|
|
arcsuffix="-$1"
|
2011-07-17 22:17:53 +00:00
|
|
|
ver="-DSVN_REV=${1#r}"
|
2004-12-18 11:34:41 +00:00
|
|
|
docver=
|
2004-02-07 18:14:53 +00:00
|
|
|
;;
|
|
|
|
'')
|
|
|
|
arcsuffix=
|
|
|
|
ver=
|
2004-12-18 11:34:41 +00:00
|
|
|
docver=
|
2004-02-07 18:14:53 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
case "$1" in *[!.0-9a-z]*) echo "Malformed release ID '$1'">&2;exit 1;;esac
|
|
|
|
arcsuffix="-$1"
|
|
|
|
ver="-DRELEASE=$1"
|
2004-12-18 11:34:41 +00:00
|
|
|
docver="VERSION=\"PuTTY release $1\""
|
2004-02-07 18:14:53 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
perl mkfiles.pl
|
2004-12-18 11:34:41 +00:00
|
|
|
(cd doc && make -s ${docver:+"$docver"})
|
2005-04-27 08:09:32 +00:00
|
|
|
sh mkauto.sh 2>/dev/null
|
2004-02-07 18:14:53 +00:00
|
|
|
|
|
|
|
relver=`cat LATEST.VER`
|
|
|
|
arcname="putty$arcsuffix"
|
|
|
|
mkdir uxarc
|
|
|
|
mkdir uxarc/$arcname
|
2004-11-17 18:27:04 +00:00
|
|
|
find . -name uxarc -prune -o \
|
|
|
|
-name CVS -prune -o \
|
|
|
|
-name .svn -prune -o \
|
|
|
|
-name . -o \
|
2004-02-07 18:14:53 +00:00
|
|
|
-type d -exec mkdir uxarc/$arcname/{} \;
|
|
|
|
find . -name uxarc -prune -o \
|
|
|
|
-name CVS -prune -o \
|
|
|
|
-name .cvsignore -prune -o \
|
2004-11-16 18:01:39 +00:00
|
|
|
-name .svn -prune -o \
|
2004-02-07 18:14:53 +00:00
|
|
|
-name '*.zip' -prune -o \
|
|
|
|
-name '*.tar.gz' -prune -o \
|
|
|
|
-type f -exec ln -s $PWD/{} uxarc/$arcname/{} \;
|
|
|
|
if test "x$ver" != "x"; then
|
|
|
|
(cd uxarc/$arcname;
|
|
|
|
md5sum `find . -name '*.[ch]' -print` > manifest;
|
|
|
|
echo "$ver" > version.def)
|
|
|
|
fi
|
2004-08-09 17:01:25 +00:00
|
|
|
tar -C uxarc -chzof $arcname.tar.gz $arcname
|
2004-02-07 18:14:53 +00:00
|
|
|
rm -rf uxarc
|