[x264-devel] [PATCH] build: remove config.git-hash on exit from version.sh
Sean McGovern
gseanmcg at gmail.com
Sun Jan 22 01:27:19 CET 2012
---
version.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/version.sh b/version.sh
index 9a415c6..46f7f20 100755
--- a/version.sh
+++ b/version.sh
@@ -1,5 +1,6 @@
#!/bin/bash
[ -n "$1" ] && cd $1
+trap 'rm -f config.git-hash' EXIT
git rev-list HEAD | sort > config.git-hash
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
if [ $LOCALVER \> 1 ] ; then
@@ -16,6 +17,5 @@ else
echo "#define X264_VERSION \"\""
VER="x"
fi
-rm -f config.git-hash
API=`grep '#define X264_BUILD' < x264.h | sed -e 's/.* \([1-9][0-9]*\).*/\1/'`
echo "#define X264_POINTVER \"0.$API.$VER\""
--
1.7.6
More information about the x264-devel
mailing list