head	1.3;
access;
symbols
	DEVEL-BRANCH-1-1:1.3
	V1-0-0:1.3
	V0-9-11:1.3
	V0-9-10:1.2
	V0-9-9:1.1
	V0-9-8:1.1
	V0-9-7:1.1
	V0-9-6:1.1
	V0-9-5:1.1
	V0-9-4:1.1
	V0-9-3:1.1
	V0-9-2:1.1
	V0-9-1:1.1;
locks; strict;
comment	@# @;


1.3
date	99.09.02.14.50.38;	author wkoch;	state Exp;
branches;
next	1.2;

1.2
date	99.07.24.09.59.06;	author wkoch;	state Exp;
branches;
next	1.1;

1.1
date	99.01.09.17.59.56;	author koch;	state Exp;
branches;
next	;


desc
@@


1.3
log
@See ChangeLog: Thu Sep  2 16:40:55 CEST 1999  Werner Koch
@
text
@#!/bin/sh
# Make a snapshot of the CVS head revision

exec >>/home/koch/mksnapshot.log 2>&1

echo "Started at `date`."
set -e

ftp_dir=$1

cd $HOME/pub
PATH="$HOME/bin:$PATH"

fix_version () {
    version=$(cat $1/VERSION)
    echo "$version-snap$(date +%Y-%m-%d)" >$1/VERSION
    cat <<EOF >$1/SNAPSHOT
		  WARNING!

This is a snapshot of the current CVS head branch!

It may not compile or not work.  Please don't report
bugs about this snapshot release it is just for your
convenience and to reduce the load of out CVS server.

Thanks,

   Werner
EOF
}

build_dist () {
    set +e
    nice scripts/autogen.sh && nice ./configure && nice make dist
    if ! awk '
/^diff gnupg-snapshot\/VERSION/  { getline; getline; getline; getline; next }
/^Common subdirectories:/   { next }
/~$/	{ next }
{ exit 1 }
'      ; then
	# Okay, we have some changes and it is not only the version number
	rm $ftp_dir/gnupg-*snap*-*-*.tar.gz
	mv gnupg-*.tar.gz $ftp_dir/
    fi
    make distclean
    set -e
}



do_export () {
    pgm=$1
    mod=$2

    rm -rf $pgm.new || true
    rm -rf $pgm.old || true
    cvs -Q export -r HEAD -d $pgm.new $mod
    fix_version $pgm.new
    if [ -n "$ftp_dir" ]; then
      here=$(pwd)
      cd $pgm.new
      build_dist
      cd $here
    fi
    [ -d $pgm ] && mv $pgm $pgm.old
    if ! mv $pgm.new $pgm ; then
	echo "rename failed - restoring" >&2
	mv $pgm.old $pgm
	exit 1
    fi
    rm -rf $pgm.old || true
}


do_export gnupg-snapshot gnupg

echo "Ended at `date`."
exit 0

@


1.2
log
@.
@
text
@a2 1
#  Fixme: we should either run autoconf here or make a real distribution
d4 3
d34 12
a45 3
    nice scripts/autogen.sh && nice ./configure && nice make dist 
    rm $ftp_dir/gnupg-*snap*-*-*.tar.gz
    mv gnupg-*.tar.gz $ftp_dir/
d50 1
d61 2
a62 2
      cd $pgm.new    
      build_dist 
d77 1
a77 1

@


1.1
log
@See ChangeLog: Sat Jan  9 18:54:57 CET 1999  Werner Koch
@
text
@d7 2
d10 1
a10 1

d30 8
d47 6
@
