[FFmpeg-cvslog] configure: simplify get_version() function
Mans Rullgard
git at videolan.org
Tue Oct 16 13:24:29 CEST 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Oct 13 22:56:25 2012 +0100| [4c995fafd861f537360b3717901cdbed6a6844e7] | committer: Mans Rullgard
configure: simplify get_version() function
awk alone can do this, no need for grep.
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c995fafd861f537360b3717901cdbed6a6844e7
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 870b6ad..a054830 100755
--- a/configure
+++ b/configure
@@ -3774,7 +3774,7 @@ get_version(){
lcname=$1
name=$(toupper $lcname)
file=$source_path/$lcname/version.h
- eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
+ eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
More information about the ffmpeg-cvslog
mailing list