#! /bin/sh

t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15

f=../README

. ../RELEASE

# If the version number has changed, generate a new README file (don't generate
# a new one just because the date changed, that happens all the time).
cnt=`(sed -e q < $f; echo "$WIREDTIGER_VERSION_STRING") |
    sed -e 's/:.*//' | sort -u | wc -l`
test $cnt -eq 1 && exit 0

cat << END_TEXT > $t
$WIREDTIGER_VERSION_STRING

This is version $WIREDTIGER_VERSION_MAJOR.$WIREDTIGER_VERSION_MINOR.$WIREDTIGER_VERSION_PATCH of WiredTiger.

WiredTiger release packages and documentation can be found at:

	http://source.wiredtiger.com/

Information on configuring, building and installing WiredTiger can be
found at:

	http://source.wiredtiger.com/install.html

WiredTiger licensing information can be found at:

	http://source.wiredtiger.com/license.html

For general questions and discussion, please use the WiredTiger mailing
list:

	http://groups.google.com/group/wiredtiger-users
END_TEXT

cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f)
