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

Side by Side Diff: mount_gpt_image.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 unified diff | Download patch
« no previous file with comments | « emit_gpt_scripts.sh ('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 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Helper script that mounts chromium os image from a device or directory 7 # Helper script that mounts chromium os image from a device or directory
8 # and creates mount points for /var and /usr/local (if in dev_mode). 8 # and creates mount points for /var and /usr/local (if in dev_mode).
9 9
10 . "$(dirname "$0")/common.sh" 10 . "$(dirname "$0")/common.sh"
11 11
12 # For functions related to gpt images. 12 # For functions related to gpt images.
13 . "$(dirname "$0")/chromeos-common.sh" 13 . "$(dirname "$0")/chromeos-common.sh"
14 locate_gpt
14 15
15 get_default_board 16 get_default_board
16 17
17 # Flags. 18 # Flags.
18 DEFINE_string board "$DEFAULT_BOARD" \ 19 DEFINE_string board "$DEFAULT_BOARD" \
19 "The board for which the image was built." b 20 "The board for which the image was built." b
20 DEFINE_boolean unmount $FLAGS_FALSE \ 21 DEFINE_boolean unmount $FLAGS_FALSE \
21 "Unmount previously mounted dir." u 22 "Unmount previously mounted dir." u
22 DEFINE_string from "/dev/sdc" \ 23 DEFINE_string from "/dev/sdc" \
23 "Directory containing image or device with image on it" f 24 "Directory containing image or device with image on it" f
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 104
104 # Turn path into an absolute path. 105 # Turn path into an absolute path.
105 FLAGS_from=`eval readlink -f ${FLAGS_from}` 106 FLAGS_from=`eval readlink -f ${FLAGS_from}`
106 107
107 # Perform desired operation. 108 # Perform desired operation.
108 if [ ${FLAGS_unmount} -eq ${FLAGS_TRUE} ] ; then 109 if [ ${FLAGS_unmount} -eq ${FLAGS_TRUE} ] ; then
109 unmount_image 110 unmount_image
110 else 111 else
111 mount_image 112 mount_image
112 fi 113 fi
OLDNEW
« no previous file with comments | « emit_gpt_scripts.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698