cros_generate_update_payload: be clearer on what's being generated
BUG=None
TEST=Shows the payload type when starting/done.
Change-Id: I5ac5f10d28ff1bc7b9c894e546c5fadf90f898d4
Reviewed-on: https://chromium-review.googlesource.com/181223
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/host/cros_generate_update_payload b/host/cros_generate_update_payload
index c2f2593..2891b15 100755
--- a/host/cros_generate_update_payload
+++ b/host/cros_generate_update_payload
@@ -222,9 +222,13 @@
die "Error: you must specify an output filename with --output FILENAME"
DELTA=$FLAGS_TRUE
-[ -z "$FLAGS_src_image" ] && DELTA=$FLAGS_FALSE
+PAYLOAD_TYPE="delta"
+if [ -z "$FLAGS_src_image" ]; then
+ DELTA=$FLAGS_FALSE
+ PAYLOAD_TYPE="full"
+fi
-echo "Generating an update"
+echo "Generating $PAYLOAD_TYPE update"
# Sanity check that the real generator exists:
GENERATOR="$(which delta_generator)"
@@ -315,8 +319,4 @@
trap - INT TERM EXIT
cleanup noexit
-if [ "$DELTA" -eq "$FLAGS_TRUE" ]; then
- echo "Done generating delta."
-else
- echo "Done generating full update."
-fi
+echo "Done generating $PAYLOAD_TYPE update."