File: le_makerevision.sh

package info (click to toggle)
codelite 2.6.0.4189~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 30,868 kB
  • ctags: 32,563
  • sloc: cpp: 237,275; ansic: 20,775; lex: 2,114; yacc: 2,007; xml: 1,274; sh: 1,064; makefile: 566; python: 163
file content (31 lines) | stat: -rwxr-xr-x 1,014 bytes parent folder | download
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
30
31
################################################################################
## This file is part of CodeLite IDE and is released
## under the terms of the GNU General Public License as published by
##    the Free Software Foundation; either version 2 of the License, or
##    (at your option) any later version.
################################################################################

#!/bin/sh
has_file=0
has_svn=0

if (test -f LiteEditor/svninfo.cpp); then
	has_file=1
fi

if (test -d ".svn"); then
	has_svn=1
	cur_rev=`LC_ALL=C svn info | grep Revision | awk '{print $2;}'`
else
	cur_rev=""
fi

## generate the svninfo file
## we always do this if svn is available, but even if it isn't, create a 'blank' file if none exists
if [ $has_svn -eq 1 ] || [ $has_file -eq 0 ]; then
	echo "#include <wx/string.h>" > LiteEditor/svninfo.cpp
	printf "const wxChar * SvnRevision = wxT(\"%s\");\n" ${cur_rev} >> LiteEditor/svninfo.cpp
	echo "" >> LiteEditor/svninfo.cpp
	echo "Generating svninfo file..."
fi