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