OSDN Git Service

Add support for 64 bit Windows.
[ffftp/ffftp.git] / putty / MKUNXARC.SH
1 #!/bin/sh \r
2 \r
3 # Build a Unix source distribution from the PuTTY CVS area.\r
4 #\r
5 # Pass an argument of the form `2004-02-08' to have the archive\r
6 # tagged as a development snapshot; of the form `0.54' to have it\r
7 # tagged as a release; of the form `r1234' to have it tagged as a\r
8 # custom build. Otherwise it'll be tagged as unidentified.\r
9 \r
10 case "$1" in\r
11   ????-??-??)\r
12     case "$1" in *[!-0-9]*) echo "Malformed snapshot ID '$1'" >&2;exit 1;;esac\r
13     arcsuffix="-`cat LATEST.VER`-$1"\r
14     ver="-DSNAPSHOT=$1"\r
15     docver=\r
16     ;;\r
17   r*)\r
18     arcsuffix="-$1"\r
19     ver="-DSVN_REV=$1"\r
20     docver=\r
21     ;;\r
22   '')\r
23     arcsuffix=\r
24     ver=\r
25     docver=\r
26     ;;\r
27   *)\r
28     case "$1" in *[!.0-9a-z]*) echo "Malformed release ID '$1'">&2;exit 1;;esac\r
29     arcsuffix="-$1"\r
30     ver="-DRELEASE=$1"\r
31     docver="VERSION=\"PuTTY release $1\""\r
32     ;;\r
33 esac\r
34 \r
35 perl mkfiles.pl\r
36 (cd doc && make -s ${docver:+"$docver"})\r
37 sh mkauto.sh 2>/dev/null\r
38 \r
39 relver=`cat LATEST.VER`\r
40 arcname="putty$arcsuffix"\r
41 mkdir uxarc\r
42 mkdir uxarc/$arcname\r
43 find . -name uxarc -prune -o \\r
44        -name CVS -prune -o \\r
45        -name .svn -prune -o \\r
46        -name . -o \\r
47        -type d -exec mkdir uxarc/$arcname/{} \;\r
48 find . -name uxarc -prune -o \\r
49        -name CVS -prune -o \\r
50        -name .cvsignore -prune -o \\r
51        -name .svn -prune -o \\r
52        -name '*.zip' -prune -o \\r
53        -name '*.tar.gz' -prune -o \\r
54        -type f -exec ln -s $PWD/{} uxarc/$arcname/{} \;\r
55 if test "x$ver" != "x"; then\r
56   (cd uxarc/$arcname;\r
57    md5sum `find . -name '*.[ch]' -print` > manifest;\r
58    echo "$ver" > version.def)\r
59 fi\r
60 tar -C uxarc -chzof $arcname.tar.gz $arcname\r
61 rm -rf uxarc\r