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

Unified Diff: bin/cros_revert_image.sh

Issue 6240018: This starts to fix the scripts so that they load from /usr/lib/crosutils (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: fixing bad merge Created 9 years, 11 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 | « bin/cros_resign_image.sh ('k') | bin/cros_run_vm_test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_revert_image.sh
diff --git a/bin/cros_revert_image.sh b/bin/cros_revert_image.sh
index 5810af836cc03e67862b0bc853ee7c2c664ff8e7..c47f38bf227e1e4afe804be75e6353602a2f685f 100755
--- a/bin/cros_revert_image.sh
+++ b/bin/cros_revert_image.sh
@@ -1,4 +1,7 @@
#!/bin/bash
+# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
# Usage:
# revert_image.sh [image_to_revert]
@@ -6,7 +9,7 @@
# This assumes the image has been updated by update_image.sh.
usage()
{
-cat <<EOF
+ cat <<EOF
usage:
revert_image.sh [image_to_revert]
@@ -19,24 +22,23 @@ if [[ $# < 1 ]]; then
exit 1
fi
-IMAGE=$( readlink -f ${1} )
-IMAGE_DIR=$( dirname ${IMAGE} )
+IMAGE=$(readlink -f "$1")
+IMAGE_DIR=$(dirname "$IMAGE")
-if [[ -z "${IMAGE}" ]]; then
+if [[ -z "$IMAGE" ]]; then
echo "Missing required argument 'image_to_revert'"
usage
exit 1
fi
-cd ${IMAGE_DIR}
+cd "$IMAGE_DIR"
if [[ ! -d "./orig_partitions" ]]; then
echo "Could not find original partitions."
exit 1
fi
-yes | cp ./orig_partitions/* ./
+cp -f ./orig_partitions/* ./
-./pack_partitions.sh ${IMAGE}
+./pack_partitions.sh "$IMAGE"
rm -rf ./orig_partitions
-cd -
« no previous file with comments | « bin/cros_resign_image.sh ('k') | bin/cros_run_vm_test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698