From 536eaaaee738b660652906848ba37474a1a4219a Mon Sep 17 00:00:00 2001 From: Gaurav Shah Date: Wed, 14 Jul 2010 13:56:39 -0700 Subject: [PATCH] Make re-signing script abort on error. Review URL: http://codereview.chromium.org/2967011 --- scripts/image_signing/cros_resign_image_standalone.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/image_signing/cros_resign_image_standalone.sh b/scripts/image_signing/cros_resign_image_standalone.sh index 523d512095..13a4dfbe4b 100755 --- a/scripts/image_signing/cros_resign_image_standalone.sh +++ b/scripts/image_signing/cros_resign_image_standalone.sh @@ -7,11 +7,14 @@ # Standalone version of cros_resign_image.sh script from # from chromeos/src/scripts/bin/ for use on signing servers. -# Both the cgpt tool and vbutil_kernel should be in the system path. +# Both the cgpt tool and vbutil_kernel should be in the system path. + +# Abort on error +set -e # Check arguments if [ $# -ne 4 ] ; then - echo "usage: $0 src_bin dst_bin kernel_datakey kernel_keyblock" + echo "usage: $0 src_bin dst_bin kernel_datakey kernel_keyblock" exit 1 fi @@ -54,6 +57,3 @@ dd if="${temp_out_vb}" of="${dst_bin}" seek=$koffset bs=$sector_size \ echo "New signed image was output to ${dst_bin}" -# Clean up temporary files -rm -f ${temp_kimage} -rm -f ${temp_out_vb}