]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - mkunxarc.sh
first pass
[PuTTY.git] / mkunxarc.sh
index 0f9ff31c6475878d35c5c1a47b23c698a260e3f6..34aee8b234f3c37cf896e6deb7a071a1306c45e1 100755 (executable)
@@ -1,40 +1,15 @@
-#!/bin/bash 
+#!/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; of the form `r1234' to have it tagged as a
-# custom build. Otherwise it'll be tagged as unidentified.
+# 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
-    autoconfver="`cat LATEST.VER`-$1"
-    arcsuffix="-$autoconfver"
-    ver="-DSNAPSHOT=$1"
-    docver=
-    ;;
-  r*)
-    autoconfver="$1"
-    arcsuffix="-$autoconfver"
-    ver="-DSVN_REV=${1#r}"
-    docver=
-    ;;
-  '')
-    autoconfver="X.XX" # got to put something in here!
-    arcsuffix=
-    ver=
-    docver=
-    ;;
-  *)
-    case "$1" in *[!.0-9a-z]*) echo "Malformed release ID '$1'">&2;exit 1;;esac
-    autoconfver="$1"
-    arcsuffix="-$autoconfver"
-    ver="-DRELEASE=$1"
-    docver="VERSION=\"PuTTY release $1\""
-    ;;
-esac
+autoconfver="$1"
+arcsuffix="$2"
+docver="$3"
 
 perl mkfiles.pl
 (cd doc && make -s ${docver:+"$docver"})
@@ -56,12 +31,7 @@ find . -name uxarc -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
-sed "s/^AC_INIT(putty,.*/AC_INIT(putty, $autoconfver)/" unix/configure.ac > uxarc/$arcname/unix/configure.ac
+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