Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Unified Diff: scripts/image_signing/tag_image.sh

Issue 3796003: tag_image.sh: support more tags (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/image_signing/tag_image.sh
diff --git a/scripts/image_signing/tag_image.sh b/scripts/image_signing/tag_image.sh
index 143a22150507d78907c16057656ebac3cb7ae7db..ad7bacaad23cfc908058db8913c90f1e6f42950b 100755
--- a/scripts/image_signing/tag_image.sh
+++ b/scripts/image_signing/tag_image.sh
@@ -12,10 +12,17 @@
DEFINE_string from "chromiumos_image.bin" \
"Input file name of Chrome OS image to tag/stamp."
-DEFINE_string update_firmware "" \
- "Tag to force updating firmware (1 to enable, 0 to disable)"
DEFINE_string dev_mode "" \
- "Tag for developer mode (1 to enable, 0 to disable)"
+ "(build-info) Tag as a developer mode build (1 to enable, 0 to disable)"
+DEFINE_string update_firmware "" \
+ "(auto-update) Force updating firmware (1 to enable, 0 to disable)"
+DEFINE_string forget_usernames "" \
+ "(session-manager) Forget usernames (1 to enable, 0 to disable)"
+DEFINE_string leave_core "" \
+ "(crash-reporter) Leave core dumps (1 to enable, 0 to disable)"
+
+# TODO(hungte) we can add factory_installer and factory_test,
+# but I don't see any reason to tweak/check these values.
# Parse command line
FLAGS "$@" || exit 1
@@ -24,8 +31,8 @@ eval set -- "${FLAGS_ARGV}"
# Abort on error
set -e
-if [ -z ${FLAGS_from} ] || [ ! -f ${FLAGS_from} ] ; then
- echo "Error: invalid flag --from"
+if [ -z "${FLAGS_from}" ] || [ ! -s "${FLAGS_from}" ] ; then
+ echo "Error: need a valid file by --from"
exit 1
fi
@@ -112,16 +119,28 @@ process_all_tags() {
local do_modification="$2"
process_tag "${do_modification}" \
- "Update Firmware" \
+ "(build-info) dev_mode" \
+ "${rootfs}" \
+ /root/.dev_mode \
+ "${FLAGS_dev_mode}"
+
+ process_tag "${do_modification}" \
+ "(auto-update) update_firmware" \
"${rootfs}" \
/root/.force_update_firmware \
"${FLAGS_update_firmware}"
process_tag "${do_modification}" \
- "Developer Mode" \
+ "(session-manager) forget_usernames" \
"${rootfs}" \
- /root/.dev_mode \
- "${FLAGS_dev_mode}"
+ /root/.forget_usernames \
+ "${FLAGS_forget_usernames}"
+
+ process_tag "${do_modification}" \
+ "(crash-reporter) leave_core" \
+ "${rootfs}" \
+ /root/.leave_core \
+ "${FLAGS_leave_core}"
}
IMAGE=$(readlink -f "${FLAGS_from}")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698