]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - mkunxarc.sh
Move generation of the "configure" script into its own script so that
[PuTTY.git] / mkunxarc.sh
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
9 case "$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     docver=
15     ;;
16   '')
17     arcsuffix=
18     ver=
19     docver=
20     ;;
21   *)
22     case "$1" in *[!.0-9a-z]*) echo "Malformed release ID '$1'">&2;exit 1;;esac
23     arcsuffix="-$1"
24     ver="-DRELEASE=$1"
25     docver="VERSION=\"PuTTY release $1\""
26     ;;
27 esac
28
29 perl mkfiles.pl
30 (cd doc && make -s ${docver:+"$docver"})
31 sh mkauto.sh
32
33 relver=`cat LATEST.VER`
34 arcname="putty$arcsuffix"
35 mkdir uxarc
36 mkdir uxarc/$arcname
37 find . -name uxarc -prune -o \
38        -name CVS -prune -o \
39        -name .svn -prune -o \
40        -name . -o \
41        -type d -exec mkdir uxarc/$arcname/{} \;
42 find . -name uxarc -prune -o \
43        -name CVS -prune -o \
44        -name .cvsignore -prune -o \
45        -name .svn -prune -o \
46        -name '*.zip' -prune -o \
47        -name '*.tar.gz' -prune -o \
48        -type f -exec ln -s $PWD/{} uxarc/$arcname/{} \;
49 if test "x$ver" != "x"; then
50   (cd uxarc/$arcname;
51    md5sum `find . -name '*.[ch]' -print` > manifest;
52    echo "$ver" > version.def)
53 fi
54 tar -C uxarc -chzof $arcname.tar.gz $arcname
55 rm -rf uxarc