]>
Commit | Line | Data |
---|---|---|
cc6339ac MB |
1 | #! /bin/sh |
2 | ||
d427e09a R |
3 | #TODO: we should tag our version changes, and use git describe instead of git log. |
4 | ||
cc6339ac MB |
5 | echo "Extracting src/version.c ..." |
6 | ||
d427e09a R |
7 | if [ -d ../.git ]; then |
8 | if [ -x `which git` ]; then | |
9 | echo "Found git. version is"`git log -1 --pretty=oneline` | |
10 | cvs_version="git:"`git log -1 --pretty=oneline` | |
11 | else | |
12 | echo "No git installed. unknown git revision" | |
13 | cvs_version="unknown" | |
14 | fi | |
cc6339ac | 15 | else |
d427e09a R |
16 | echo "Not a git repository. leaving revision empty" |
17 | cvs_version="not git" | |
cc6339ac MB |
18 | fi |
19 | ||
d427e09a | 20 | |
cc6339ac MB |
21 | /bin/cat >version.c <<!SUB!THIS! |
22 | /* version.c - CVS Version specific information. | |
23 | * Copyright 2000-2004 srvx Development Team | |
24 | * | |
25 | * This file is part of x3. | |
26 | * | |
27 | * x3 is free software; you can redistribute it and/or modify | |
28 | * it under the terms of the GNU General Public License as published by | |
29 | * the Free Software Foundation; either version 3 of the License, or | |
30 | * (at your option) any later version. | |
31 | * | |
32 | * This program is distributed in the hope that it will be useful, | |
33 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
34 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
35 | * GNU General Public License for more details. | |
36 | * | |
37 | * You should have received a copy of the GNU General Public License | |
38 | * along with srvx; if not, write to the Free Software Foundation, | |
39 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
40 | */ | |
41 | ||
42 | #include "version.h" | |
43 | ||
44 | const char *cvs_version = "$cvs_version"; | |
45 | ||
46 | !SUB!THIS! |