From 07d2422c919cd6d0974f71528902110032a1ac57 Mon Sep 17 00:00:00 2001 From: Zdenek Behan Date: Wed, 2 Nov 2011 00:46:25 +0000 Subject: [PATCH] common.sh: Revert commit 9aa80dc4574ccd3b04d598c0727ab5b135d5416c This partially reverts and partially clarifies the code in the above commit. It was still in use, just in an obscure place, so a reference to that has been added. BUG=chromium-os:21971 TEST=below 1) build_lib/generate-au-zip.py 2) cd /tmp/au-generator/; unzip au-generator.zip 3) exit chroot; cd $chroot/tmp/au-generator/ 4) LD_LIBRARY_PATH="$(pwd)" PATH="${PATH}:$(pwd)" ./cros_generate_update_payload --image something_i_had --output x --outside_chroot Change-Id: Idfc03937c4f3517c8567efcdebd1cb8ce134fc8e Reviewed-on: https://gerrit.chromium.org/gerrit/11019 Tested-by: Zdenek Behan Reviewed-by: Mike Frysinger Commit-Ready: Zdenek Behan --- common.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common.sh b/common.sh index ae43236042..b7e74d75ae 100644 --- a/common.sh +++ b/common.sh @@ -112,7 +112,13 @@ if [ -f "$CHROMEOS_DEV_SETTINGS" ]; then fi # Load shflags -. "${SCRIPTS_DIR}"/lib/shflags/shflags || exit 1 +# NOTE: This code snippet is in particular used by the au-generator (which +# stores shflags in ./lib/shflags/) and should not be touched. +if [ -f "${SCRIPTS_DIR}/lib/shflags/shflags" ]; then + . "${SCRIPTS_DIR}/lib/shflags/shflags" +else + . ./lib/shflags/shflags || die "Couldn't find shflags" +fi # Our local mirror DEFAULT_CHROMEOS_SERVER=${CHROMEOS_SERVER:-"http://build.chromium.org/mirror"}