2 echo "Extracting version.c ..."
6 compilation=`sed -n 's/^const char \*compilation = \"\(.*\)\";/\1/p' < version.c`
7 if test ! "$compilation" ; then compilation=0; fi
12 compilation=`expr $compilation + 1`
16 { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \
18 { print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`
20 codelines=`find . -type f -regex '\./.*\.h' -or -regex '\./.*\.c' |xargs cat|wc -l`
23 git_revision=`git rev-list -n 1 --pretty="format:%h" --header master | grep '^[0-9a-f]*$'`
24 if test "x$git_revision" = "x" ; then
28 git_commitcount=`git rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"`
29 git_revision="git-$git_commitcount-$git_revision"
33 /bin/cat > version.c <<!SUB!THIS!
34 /* version.c - NeonServ v5.5
35 * Copyright (C) 2011-2012 Philipp Kreil (pk910)
37 * This program is free software: you can redistribute it and/or modify
38 * it under the terms of the GNU General Public License as published by
39 * the Free Software Foundation, either version 3 of the License, or
40 * (at your option) any later version.
42 * This program is distributed in the hope that it will be useful,
43 * but WITHOUT ANY WARRANTY; without even the implied warranty of
44 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 * GNU General Public License for more details.
47 * You should have received a copy of the GNU General Public License
48 * along with this program. If not, see <http://www.gnu.org/licenses/>.
50 //Auto generated file!
54 const char *compilation = "$compilation";
55 const char *creation = "$creation";
56 const char *revision = "$git_revision";
57 const char *codelines = "$codelines";
59 const int patchlevel = ($git_commitcount ? ($git_commitcount - VERSION_PATCHLEVEL) : 0);
61 const char *get_compilation() {
65 const char *get_creation() {
69 const char *get_revision() {
73 const char *get_codelines() {
77 const int get_patchlevel() {