From 17eeff6fcbdf99dcecc7b57d0d28eee3e9387d26 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Sun, 18 Sep 2011 20:30:46 +0800 Subject: [PATCH] crosutils: add boilerplate comments for factory scripts Adding boilerplate comments for factory scripts that may be executed inside CrOS source tree or a limited factory bundle extraction. BUG=chrome-os-partner:5979 TEST=none, only comment update Change-Id: Ifd5b07e9d44f4ce74073e5e32370040d2d6728d8 Reviewed-on: http://gerrit.chromium.org/gerrit/7908 Reviewed-by: Hung-Te Lin Tested-by: Hung-Te Lin --- make_factory_package.sh | 2 ++ make_universal_factory_shim.sh | 2 ++ mk_memento_images.sh | 2 ++ 3 files changed, 6 insertions(+) diff --git a/make_factory_package.sh b/make_factory_package.sh index 9f059ee37c..72a2e99e71 100755 --- a/make_factory_package.sh +++ b/make_factory_package.sh @@ -11,6 +11,7 @@ # miniomaha lives in src/platform/dev/ and miniomaha partition sets live # in src/platform/dev/static. +# --- BEGIN FACTORY SCRIPTS BOILERPLATE --- # This script may be executed in a full CrOS source tree or an extracted factory # bundle with limited tools, so we must always load scripts from $SCRIPT_ROOT # and search for binary programs in $SCRIPT_ROOT/../bin @@ -19,6 +20,7 @@ SCRIPT="$(readlink -f "$0")" SCRIPT_ROOT="$(dirname "$SCRIPT")" . "$SCRIPT_ROOT/lib/cros_image_common.sh" || exit 1 image_find_tool "cgpt" "$SCRIPT_ROOT/../bin" +# --- END FACTORY SCRIPTS BOILERPLATE --- if [ -f "$SCRIPT_ROOT/../dev/devserver.py" ]; then # Running within an extracted factory bundle diff --git a/make_universal_factory_shim.sh b/make_universal_factory_shim.sh index b35af9bfdf..9b03218969 100755 --- a/make_universal_factory_shim.sh +++ b/make_universal_factory_shim.sh @@ -9,6 +9,7 @@ # CAUTION: Recovery shim images are not supported yet because they require the # kernel partitions to be laid out in a special way +# --- BEGIN FACTORY SCRIPTS BOILERPLATE --- # This script may be executed in a full CrOS source tree or an extracted factory # bundle with limited tools, so we must always load scripts from $SCRIPT_ROOT # and search for binary programs in $SCRIPT_ROOT/../bin @@ -17,6 +18,7 @@ SCRIPT="$(readlink -f "$0")" SCRIPT_ROOT="$(dirname "$SCRIPT")" . "$SCRIPT_ROOT/lib/cros_image_common.sh" || exit 1 image_find_tool "cgpt" "$SCRIPT_ROOT/../bin" +# --- END FACTORY SCRIPTS BOILERPLATE --- # CGPT Header: PMBR, header, table; sec_table, sec_header CGPT_START_SIZE=$((1 + 1 + 32)) diff --git a/mk_memento_images.sh b/mk_memento_images.sh index a3edbb28e4..4c7671596b 100755 --- a/mk_memento_images.sh +++ b/mk_memento_images.sh @@ -8,6 +8,7 @@ # build_image.sh and generates an image that can be used for auto # update. +# --- BEGIN FACTORY SCRIPTS BOILERPLATE --- # This script may be executed in a full CrOS source tree or an extracted factory # bundle with limited tools, so we must always load scripts from $SCRIPT_ROOT # and search for binary programs in $SCRIPT_ROOT/../bin @@ -16,6 +17,7 @@ SCRIPT="$(readlink -f "$0")" SCRIPT_ROOT="$(dirname "$SCRIPT")" . "$SCRIPT_ROOT/lib/cros_image_common.sh" || exit 1 image_find_tool "cgpt" "$SCRIPT_ROOT/../bin" +# --- END FACTORY SCRIPTS BOILERPLATE --- set -e # We need 2-3 non-zero parameters.