[MPlayer-cvslog] r28830 - trunk/version.sh

diego subversion at mplayerhq.hu
Fri Mar 6 00:36:29 CET 2009


Author: diego
Date: Fri Mar  6 00:36:28 2009
New Revision: 28830

Log:
Add support for extracting the release version number from a VERSION file.

Modified:
   trunk/version.sh

Modified: trunk/version.sh
==============================================================================
--- trunk/version.sh	Thu Mar  5 23:19:47 2009	(r28829)
+++ trunk/version.sh	Fri Mar  6 00:36:28 2009	(r28830)
@@ -8,9 +8,14 @@ svn_revision=$(cat snapshot_version 2> /
 test $svn_revision || svn_revision=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
 test $svn_revision || svn_revision=$(grep revision .svn/entries 2>/dev/null | cut -d '"' -f2)
 test $svn_revision || svn_revision=$(sed -n -e '/^dir$/{n;p;q;}' .svn/entries 2>/dev/null)
+test $svn_revision && svn_revision=SVN-r$svn_revision
 test $svn_revision || svn_revision=UNKNOWN
 
-NEW_REVISION="#define VERSION \"SVN-r${svn_revision}${extra}\""
+# releases extract the version number from the VERSION file
+version=$(cat VERSION 2> /dev/null)
+test $version || version=$svn_revision
+
+NEW_REVISION="#define VERSION \"${version}${extra}\""
 OLD_REVISION=$(cat version.h 2> /dev/null)
 TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2009 MPlayer Team\n"'
 



More information about the MPlayer-cvslog mailing list