From: tho Date: Thu, 17 Jun 2010 09:38:20 +0000 (+0000) Subject: fix to get svn revision X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=a2f8706e1e8e95dcdef15a5c50cb098bfda1500a;p=senf.git fix to get svn revision git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1639 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/SConscript b/senf/SConscript index f9fd61b..de256e4 100644 --- a/senf/SConscript +++ b/senf/SConscript @@ -1,7 +1,7 @@ # -*- python -*- Import('env') -import SENFSCons, os +import SENFSCons, os, re ########################################################################### @@ -20,7 +20,11 @@ env.InstallSubdir(target = '$INCLUDEINSTALLDIR', # Create Version.hh MAJOR = 1 MINOR = 1 -REV = int(os.popen("svn info | grep 'Last Changed Rev:' | awk '{print $4}'").read().strip().lower()) +svn_info = re.search('.*last changed rev: (\d+).*', os.popen('svn info').read().strip().lower()); +if svn_info: + REV = int(svn_info.groups()[0]) +else: + REV = 0 env.CreateFile("Version.hh", env.Value( '// auto-generated file.\n\n' '#ifndef HH_SENF_Version\n'