#!/bin/sh

#
# $Header: /belch_a/users/rearl/tinymuck/src/RCS/mkversion.sh,v 1.4 90/09/18 08:00:52 rearl Exp $
#
# Generates version.c
#
# Copyright (c) 1990 Chelsea Dyerman
# University of California, Berkeley (XCF)
#

#
# $Log:	mkversion.sh,v $
# Revision 1.4  90/09/18  08:00:52  rearl
# Added some more acknowledgements.
# 
# Revision 1.3  90/08/15  02:54:56  rearl
# Changed a `char' to a `const char'
# 
# Revision 1.2  90/07/23  03:08:35  casie
# Fixed variable declarations for version.c
# 
# Revision 1.1  90/07/21  01:43:13  casie
# Initial revision
# 

if [ ! -f version.c ]
then
	generation=0
else
	generation=`sed -n 's/^const char \*generation = \"\(.*\)\";/\1/p' < version.c`
	if [ ! "$generation" ]; then generation=0; fi
fi

generation=`expr $generation + 1`
creation=`date | awk '{if (NF == 6) { print $1 " "  $2 " " $3 " "  $6 " at " $4 " " $5 } else { print $1 " "  $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`
cat > version.c <<EOF
/*
 * Copyright (c) 1990 Chelsea Dyerman
 * University of California, Berkeley (XCF)
 *
 */

/*
 * This file is generated by mkversion.sh. Any changes made will go away.
 */
#include "config.h"
#ifndef RSAIX
#include "struct.h"
#endif
#include "patchlevel.h"

const char *generation = "$generation";
const char *creation = "$creation";
const char *version = VERSION_STRING;

const char *infotext[] =
{
    "Based on the original code written by these programmers:",
    "",
    "David Applegate    James Aspnes    Timothy Freeman    Bennet Yee",
    "",
    "This is release 1.1 of TinyMAGE, a user-extendible, user-programmable",
    "multi-user adventure game. TinyMAGE was derived from TinyMUCK 2.2 and",
    "TinyMUSH which were in turn derived from TinyMUD v1.5.2, with",
    "extensive modifications.  Because of all the modifications, this",
    "program is not in  any way, shape,  or form being supported by any of",
    "the  original authors.  Any bugs, suggestions,  ideas, etc, should be",
    "directed to the persons listed below. Do not send diff files, send us",
    "mail about the bug and describe as best as you can, where you were at",
    "the bug occured, and what you think caused the bug to be was produced",
    "so we can try to reproduce it and track it down.",
    "",
    "The minor changes and enhancements found in this version were done by:",
    "byte         Francis Hsu              fihsu@athena.mit.edu",
    "",
    "The large job of transforming TinyMUCK 2.2 to TinyMAGE was done by:",
    "",
    "Koosh        Nils McCarthy            mtymp01@ux.acs.umn.edu",
    "",
    "The following persons have made many changes and enhancements to the ",
    "code and may know how TinyMUCK really works if you have questions ",
    "about it:",
    "",
    "ChupChup     Robert Earl              rearl@belch.berkeley.edu",
    "Ashley       Chelsea Dyerman          casie@fraud.berkeley.edu",
    "Ghondahrl    Stephen White            sfwhite@watcgl.waterloo.edu",
    "Lachesis     Na Choon Piaw            lachesis@belch.berkeley.edu",
    "",
    "Those who helped in prior versions and continue to be helpful:",
    "Jimbo        Jim Mattson              jmattson@ucsd.edu",
    "Random       Russ Smith               russ@uokmax.ecn.uoknor.edu",
    "Various modifications, bugreports, cleanups by:",
    "Jon Callas                            callas@eris.enet.dec.com",
    "Alpha and beta testers, who put up with our bugs, and such:",
    "",
    "Thanks also goes to those persons not mentioned here who have added",
    "their advice, opinions, and code to TinyMAGE.",
    0,
};

EOF

exit 0