X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=mkunxarc.sh;h=34aee8b234f3c37cf896e6deb7a071a1306c45e1;hb=510f49e405e71ba5c97875e7a019364e1ef5fac9;hp=3485612b7a2dff5c7c3d65986416a50739ff53e9;hpb=2fcbb1c7b768529e71c85f101c6195bf6ed032b1;p=PuTTY.git diff --git a/mkunxarc.sh b/mkunxarc.sh index 3485612b..34aee8b2 100755 --- a/mkunxarc.sh +++ b/mkunxarc.sh @@ -1,47 +1,38 @@ -#!/bin/sh +#!/bin/sh # 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 -# tagged as a release. +# Expects the following arguments: +# - the version number to write into configure.ac +# - the suffix to put on the Unix source tarball +# - the options to put on the 'make' command line for the docs -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" - ;; - '') - arcsuffix= - ver= - ;; - *) - case "$1" in *[!.0-9a-z]*) echo "Malformed release ID '$1'">&2;exit 1;;esac - arcsuffix="-$1" - ver="-DRELEASE=$1" - ;; -esac +autoconfver="$1" +arcsuffix="$2" +docver="$3" perl mkfiles.pl -(cd doc && make) +(cd doc && make -s ${docver:+"$docver"}) relver=`cat LATEST.VER` arcname="putty$arcsuffix" mkdir uxarc mkdir uxarc/$arcname -find . -name uxarc -prune -o -name . -o \ +find . -name uxarc -prune -o \ + -name CVS -prune -o \ + -name .svn -prune -o \ + -name . -o \ -type d -exec mkdir uxarc/$arcname/{} \; find . -name uxarc -prune -o \ -name CVS -prune -o \ -name .cvsignore -prune -o \ + -name .svn -prune -o \ + -name configure.ac -prune -o \ -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 -tar -C uxarc -chzf - $arcname > $arcname.tar.gz +sed "s/^AC_INIT(putty,.*/AC_INIT(putty, $autoconfver)/" configure.ac > uxarc/$arcname/configure.ac +(cd uxarc/$arcname && sh mkauto.sh) 2>errors || { cat errors >&2; exit 1; } + +tar -C uxarc -chzof $arcname.tar.gz $arcname rm -rf uxarc