commit | 3756c3e54fd61d2a27737020928b2b079f356caf | [log] [tgz] |
---|---|---|
author | Yifan Hong <elsk@google.com> | Fri Jul 24 20:25:51 2020 -0700 |
committer | Yifan Hong <elsk@google.com> | Mon Jul 27 20:27:35 2020 +0000 |
tree | 4184826b7d6875c4dc0756aeb15f2a94f6305817 | |
parent | c3806663263ba01c35c66f8185402bbbd456380f [diff] [blame] |
brillo_update_payload: allow specifying delta_generator from env Help solve the following error when using brillo_update_payload inside sandboxes: "delta_generator" is not allowed to be used. See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information." ... by specifying GENERATOR=path/to/delta_generator in the environment. Test: build GKI Bug: 162116212 Change-Id: I8e3444539e3692738b0309ab7b1f829d0e840ac2
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload index 63b6d24..4b581fb 100755 --- a/scripts/brillo_update_payload +++ b/scripts/brillo_update_payload
@@ -897,7 +897,7 @@ } # Sanity check that the real generator exists: -GENERATOR="$(which delta_generator || true)" +[[ -x "${GENERATOR}" ]] || GENERATOR="$(which delta_generator || true)" [[ -x "${GENERATOR}" ]] || die "can't find delta_generator" case "$COMMAND" in