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

Side by Side Diff: src/scripts/emit_gpt_scripts.sh

Issue 1633018: devserver support for update images from buildbot. (Closed)
Patch Set: Created 10 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/platform/dev/devserver.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 # Emit scripts to pack and unpack the partitions from a GPT disk image. 6 # Emit scripts to pack and unpack the partitions from a GPT disk image.
7 7
8 # Load common constants. This should be the first executable line. 8 # Load common constants. This should be the first executable line.
9 # The path to common.sh should be relative to your script's location. 9 # The path to common.sh should be relative to your script's location.
10 . "$(dirname "$0")/common.sh" 10 . "$(dirname "$0")/common.sh"
(...skipping 27 matching lines...) Expand all
38 echo "$HEADER" > "$PACK" 38 echo "$HEADER" > "$PACK"
39 echo "$HEADER" > "$UNPACK" 39 echo "$HEADER" > "$UNPACK"
40 cat $TMP | sed -e 's/^/# /' >> "$PACK" 40 cat $TMP | sed -e 's/^/# /' >> "$PACK"
41 cat $TMP | sed -e 's/^/# /' >> "$UNPACK" 41 cat $TMP | sed -e 's/^/# /' >> "$UNPACK"
42 42
43 sort -n -k 3 $TMP | \ 43 sort -n -k 3 $TMP | \
44 grep 'GPT part -' | \ 44 grep 'GPT part -' | \
45 while read start size part x x x label x; do \ 45 while read start size part x x x label x; do \
46 file="part_$part" 46 file="part_$part"
47 loc="\"\$TARGET\"" 47 loc="\"\$TARGET\""
48 echo "sudo dd if=$loc of=$file bs=512 skip=$start count=$size" \ 48 echo "dd if=$loc of=$file bs=512 skip=$start count=$size" \
49 >> "$UNPACK" 49 >> "$UNPACK"
50 echo \ 50 echo \
51 "sudo dd if=$file of=$loc bs=512 seek=$start count=$size conv=notrunc" \ 51 "dd if=$file of=$loc bs=512 seek=$start count=$size conv=notrunc" \
52 >> "$PACK" 52 >> "$PACK"
53 done 53 done
54 54
55 chmod +x "$PACK" "$UNPACK" 55 chmod +x "$PACK" "$UNPACK"
56 56
57 rm $TMP 57 rm $TMP
OLDNEW
« no previous file with comments | « src/platform/dev/devserver.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698