blob: f0f7353828b1970c3351afaedc689ed65ac984ce (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/sh
# $Id: newvers.sh,v 1.2 2003/06/22 14:45:17 in2 Exp $
# prevent localized logs
LC_ALL=C
export LC_ALL
t=`date`
# are we working in CVS?
if [ -d ".svn" ] ; then
#determine branch
branch=`svn info | grep '^URL: ' | sed 's/.*\/pttbbs\/\([a-zA-Z0-9_\-\.]*\)\/pttbbs\/.*/\1/'`
branch="$branch "
#determine rev
rev=`svn info | grep Revision | sed 's/Revision: /r/'`
if [ "$rev" != "" ]
then
t="$t, $branch$rev"
fi
fi
cat << EOF > vers.c
char * const compile_time = "${t}";
EOF
|