scripts/package-metadata.pl: fix kmod pakage dependencies within the SDK
[openwrt/openwrt.git] / scripts / patch-specs.sh
index 2ab779084b8a78c9d4c3140116d7098d5ee204f6..3307b6b0904501a83a5f8bc8824d91c9304c6fd1 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