mirror of https://github.com/mpv-player/mpv
Adapt FFmpeg version.sh that only recreates version.h if its content changed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18787 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
57f3213401
commit
7dda786ccb
11
version.sh
11
version.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue