brillo_update_payload: allow specifying delta_generator from env am: 3756c3e54f am: b72867975f am: 46383819fe

Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1372604

Change-Id: Ie677e107afbeb66f74f4032ab34b297da7aea035
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