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