From ea8ed8f5dad61b949723689611f64342c6817d4f Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 8 Jul 2013 21:50:22 -0700 Subject: [PATCH] fix(core_upload_update): Set PATH for au-generator.zip bundles. The tools provided by au-generator.zip are expected to be in the PATH by this script and the scripts it calls. Make it so. --- core_upload_update | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core_upload_update b/core_upload_update index e1424702cf..47d24c2dad 100755 --- a/core_upload_update +++ b/core_upload_update @@ -45,6 +45,15 @@ switch_to_strict_mode [[ -z "${FLAGS_private_key}" ]] && die "--private_key is required" [[ -z "${FLAGS_public_key}" ]] && die "--public_key is required" +# Add the current directory to $PATH if we seem to be from a au bundle +if ! which cros_generate_update_payload &>/dev/null; then + if [[ -e "${SCRIPT_ROOT}/cros_generate_update_payload" ]]; then + export PATH="${SCRIPT_ROOT}:${PATH}" + else + die_notrace "Cannot find cros_generate_update_payload" + fi +fi + OUTPUT_DIR=$(mktemp -d) trap "rm -rf ${OUTPUT_DIR}" INT TERM EXIT