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

Unified Diff: emit_gpt_scripts.sh

Issue 2792011: Use new cgpt tool when creating images and the pack/unpack scripts. (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: Created 10 years, 6 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 | « chromeos_version.sh ('k') | mount_gpt_image.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: emit_gpt_scripts.sh
diff --git a/emit_gpt_scripts.sh b/emit_gpt_scripts.sh
index b16e4b3a4285e8cc994b78521af4a9bbe8d243af..12e3629f1bd3c5ddabcbf47098f06f9a307837a7 100755
--- a/emit_gpt_scripts.sh
+++ b/emit_gpt_scripts.sh
@@ -26,7 +26,7 @@ UNPACK="${DIR}/unpack_partitions.sh"
locate_gpt
TMP=$(mktemp)
-sudo $GPT -r show -l "$IMAGE" > $TMP
+$GPT show "$IMAGE" > $TMP
HEADER='#!/bin/sh -eu
# File generated by emit_gpt_scripts.sh. Do not edit.
@@ -42,9 +42,8 @@ echo "$HEADER" > "$UNPACK"
cat $TMP | sed -e 's/^/# /' >> "$PACK"
cat $TMP | sed -e 's/^/# /' >> "$UNPACK"
-sort -n -k 3 $TMP | \
- grep 'GPT part -' | \
- while read start size part x x x label x; do \
+$GPT show -q "$IMAGE" | \
+ while read start size part x; do \
file="part_$part"
loc="\"\$TARGET\""
echo "dd if=$loc of=$file bs=512 skip=$start count=$size" \
« no previous file with comments | « chromeos_version.sh ('k') | mount_gpt_image.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698