[MPlayer-cvslog] r18787 - trunk/version.sh
diego
subversion at mplayerhq.hu
Thu Jun 22 15:47:51 CEST 2006
Author: diego
Date: Thu Jun 22 15:47:50 2006
New Revision: 18787
Modified:
trunk/version.sh
Log:
Adapt FFmpeg version.sh that only recreates version.h if its content changed.
Modified: trunk/version.sh
==============================================================================
--- trunk/version.sh (original)
+++ trunk/version.sh Thu Jun 22 15:47:50 2006
@@ -1,7 +1,12 @@
#!/bin/sh
-revision=r`grep revision .svn/entries | cut -d '"' -f 2 2> /dev/null`
-
test "$1" && extra="-$1"
-echo "#define VERSION \"dev-SVN-${revision}${extra}\"" > version.h
+svn_revision=`svn info | grep Revision | cut -d' ' -f2 || echo UNKNOWN`
+NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\""
+OLD_REVISION=`cat version.h 2> /dev/null`
+
+# Update version.h only on revision changes to avoid spurious rebuilds
+if test "$NEW_REVISION" != "$OLD_REVISION"; then
+ echo "$NEW_REVISION" > version.h
+fi
More information about the MPlayer-cvslog
mailing list