From 6f1c4ec25bd4e74d1ca522e945a5dcb0dddbc5c8 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 8 May 2013 20:40:01 +0000 Subject: [PATCH] build: better NaCl version detection. --- build/run-bitten.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/build/run-bitten.sh b/build/run-bitten.sh index a5004b61..df4bf129 100755 --- a/build/run-bitten.sh +++ b/build/run-bitten.sh @@ -210,15 +210,9 @@ append "" append "[pepper]" if [ "$family" != "windows" ]; then - if [ -d "$NACL_SDK_ROOT" ]; then - pepper_version=0 - for dir in "$NACL_SDK_ROOT/pepper_"*; do - new_version="$(echo "$dir" | sed 's/.*_//')" - if [ "$new_version" -gt "$pepper_version" ]; then - pepper_version="$new_version" - fi - done - if [ "$pepper_version" != 0 ]; then + if [ -f "$NACL_SDK_ROOT/README" ]; then + pepper_version=$(sed -ne 's/Version: //p' "$NACL_SDK_ROOT/README") + if [ "x$pepper_version" != "x" ]; then append "version = $pepper_version" fi fi