[scripts] patch-specs.sh: gcc 3.4.6 has an additional "(OpenWrt-2.0)" after the versi...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 29 Jan 2012 20:19:06 +0000 (20:19 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 29 Jan 2012 20:19:06 +0000 (20:19 +0000)
SVN-Revision: 29948

scripts/patch-specs.sh

index 2ab7790..3307b6b 100755 (executable)
@@ -62,7 +62,7 @@ patch_specs() {
 }
 
 
-VERSION="$(STAGING_DIR="$DIR" "$CPP" --version | head -n1)"
+VERSION="$(STAGING_DIR="$DIR" "$CPP" --version | sed -ne 's/^.* (.*) //; s/ .*$//; 1p')"
 VERSION="${VERSION:-unknown}"
 
 case "${VERSION##* }" in