]> jfr.im git - solanum.git/blob - ircd/version.c.SH
make build reproducible
[solanum.git] / ircd / version.c.SH
1 #!/bin/sh
2
3 # $Id: version.c.SH 3342 2007-04-01 22:10:05Z jilles $
4
5 spitshell=cat
6 package=IRC
7
8 echo "Extracting $package/src/version.c..."
9
10 if test -r version.c.last
11 then
12 generation=`sed -n 's/^char \*generation = \"\(.*\)\";/\1/p' < version.c.last`
13 if test ! "$generation" ; then generation=0; fi
14 else
15 generation=0
16 fi
17
18 generation=`expr $generation + 1`
19
20 if test "$EXTERNAL_BUILD_TIMESTAMP" = ''; then
21 creation=`LC_ALL=C date | \
22 awk '{if (NF == 6) \
23 { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \
24 else \
25 { print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`
26 else
27 creation="$EXTERNAL_BUILD_TIMESTAMP"
28 fi
29
30 $spitshell >version.c <<!SUB!THIS!
31 /*
32 * IRC - Internet Relay Chat, src/version.c
33 * Copyright (C) 1990 Chelsea Ashley Dyerman
34 *
35 * This program is free software; you can redistribute it and/or modify
36 * it under the terms of the GNU General Public License as published by
37 * the Free Software Foundation; either version 1, or (at your option)
38 * any later version.
39 *
40 * This program is distributed in the hope that it will be useful,
41 * but WITHOUT ANY WARRANTY; without even the implied warranty of
42 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 * GNU General Public License for more details.
44 *
45 * You should have received a copy of the GNU General Public License
46 * along with this program; if not, write to the Free Software
47 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
48 */
49
50 /*
51 * This file is generated by version.c.SH. Any changes made will go away.
52 */
53
54 #include "patchlevel.h"
55 #include "serno.h"
56
57 const char *generation = "$generation";
58 const char *creation = "$creation";
59 const char *ircd_version = PATCHLEVEL;
60 const char *serno = SERNO;
61
62 const char *infotext[] =
63 {
64 "$package --",
65 "Based on the original code written by Jarkko Oikarinen",
66 "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center",
67 "Copyright (c) 1996-2001 Hybrid Development Team",
68 "Copyright (c) 2002-2009 ircd-ratbox Development Team",
69 "Copyright (c) 2005-2016 charybdis development team",
70 " ",
71 "This program is free software; you can redistribute it and/or",
72 "modify it under the terms of the GNU General Public License as",
73 "published by the Free Software Foundation; either version 2, or",
74 "(at your option) any later version.",
75 " ",
76 !SUB!THIS!
77
78 IFS='
79 '
80 for i in `grep -v '^$Id' ../CREDITS |tr -d '"'` ; do
81 echo " \"$i\"," >> version.c
82 done
83 $spitshell >>version.c <<!SUB!THISTOO!
84 "",
85 0,
86 };
87 !SUB!THISTOO!