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