Merged revisions 11610-11649 via svnmerge from
[wvapps.git] / snapshot.sh
blob78b1751ec5096377e495e40345db6a891d77778e
1 #!/bin/bash
2 # This program creates snapshots of our software offerings.
4 CURDIR=$(readlink -f `dirname "$0"`)
6 PROGRAMS="wvstreams wvsyslogd wvdial retchmail tunnelv wvprint wvtftp nss-uniconf passwd-uniconf funfs unity"
8 if [ "x$1" != "x" ]; then
9 PROGRAMS="$@"
12 # Make sure xplc is put inside our distribution
13 if ! test -L "$CURDIR/wvstreams/.xplc"; then
14 ln -s "$CURDIR/wvports/xplc" "$CURDIR/wvstreams/.xplc"
17 if [ "x$RELEASE" == "x" ]; then
18 export PKGSNAPSHOT=1
21 echo '--> Making snapshots/ and debian-snapshots/...'
22 test -d snapshots || mkdir snapshots
23 test -d debian-snapshots || mkdir debian-snapshots
25 for i in $PROGRAMS; do
26 echo "--> Building snapshot for $i..."
27 if [ "$i" != 'wvstreams' ]; then
28 cp -af wvstreams/wvrules.mk wvstreams/svn2cl.xsl $i/
30 cp -af wvver.h $i/
31 FILES=`cd $i && make dist-dir`
32 DEBFILES=`echo $FILES | tr - _`
33 make -C "$i" dist
35 ln -f "$i/../build/$FILES.tar.gz" snapshots/
36 ln -f "$i/../build/$FILES.tar.gz" "debian-snapshots/$DEBFILES.orig.tar.gz"
37 done
39 # Remove xplc from our actual copy of WvStreams now that
40 # we're done snapshotting
41 rm -rf wvstreams/xplc
42 rm -f wvstreams/.xplc