commit | c288d5ba2182a0b2742fa93d04db3e024b00e98e | [log] [tgz] |
---|---|---|
author | Tao Bao <[email protected]> | Thu Oct 03 13:47:06 2019 -0700 |
committer | Tao Bao <[email protected]> | Thu Oct 03 14:06:03 2019 -0700 |
tree | ddf16bf0c777a71e177b294ca15360d99250aec7 | |
parent | 05b3b963888adb5b9bbe906fb09cdae7ce47836c [diff] [blame] |
Replace `look` with `grep`. `look` is an external host tool that's not coming from the Android repo. https://android.googlesource.com/platform/build/+/master/Changes.md#path_tools Bug: 142073223 Test: `m -j ota_from_target_files`; Generate incremental package. Change-Id: Idf5ee71846ea641387a36887a0ffc3d4a322743d
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload index 23d2d7e..d9c18ff 100755 --- a/scripts/brillo_update_payload +++ b/scripts/brillo_update_payload
@@ -281,7 +281,7 @@ local option_key="$2" local default_value="${3:-}" local value - if value=$(look "${option_key}=" "${file_txt}" | tail -n 1); then + if value=$(grep "^${option_key}=" "${file_txt}" | tail -n 1); then if value=$(echo "${value}" | cut -f 2- -d "=" | grep -E "^[0-9]+$"); then echo "${value}" return