Another admin script, to build the Unix source archive.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Feb 2004 18:14:53 +0000 (18:14 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Feb 2004 18:14:53 +0000 (18:14 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@3819 cda61777-01e9-0310-a592-d414129be87e

mkunxarc.sh [new file with mode: 0755]

diff --git a/mkunxarc.sh b/mkunxarc.sh
new file mode 100755 (executable)
index 0000000..fa91dc2
--- /dev/null
@@ -0,0 +1,46 @@
+#!/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.
+
+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
+
+perl mkfiles.pl
+
+relver=`cat LATEST.VER`
+arcname="putty$arcsuffix"
+mkdir uxarc
+mkdir uxarc/$arcname
+find . -name uxarc -prune -o -name . -o \
+       -type d -exec mkdir uxarc/$arcname/{} \;
+find . -name uxarc -prune -o \
+       -name CVS -prune -o \
+       -name .cvsignore -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
+rm -rf uxarc