On Mon, 15 Oct 2012, Mans Rullgard wrote:

awk alone can do this, no need for grep.

Signed-off-by: Mans Rullgard <m...@mansr.com>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 700e99d..3bb8fff 100755
--- a/configure
+++ b/configure
@@ -3775,7 +3775,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
--
1.7.12.3

Ok

// Martin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to