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

Side by Side Diff: mount_gpt_image.sh

Issue 6312112: Fix recent change which prevented mount_gpt_image from running outside chroot. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Typo fix. Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 # --- BEGIN COMMON.SH BOILERPLATE --- 10 # --- BEGIN COMMON.SH BOILERPLATE ---
(...skipping 10 matching lines...) Expand all
21 SCRIPT_ROOT=${path} 21 SCRIPT_ROOT=${path}
22 break 22 break
23 fi 23 fi
24 done 24 done
25 } 25 }
26 26
27 find_common_sh 27 find_common_sh
28 . "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1) 28 . "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
29 # --- END COMMON.SH BOILERPLATE --- 29 # --- END COMMON.SH BOILERPLATE ---
30 30
31 # Need to be inside the chroot to load chromeos-common.sh 31 if [ $INSIDE_CHROOT -ne 1 ]; then
32 assert_inside_chroot 32 INSTALL_ROOT="$GCLIENT_ROOT/src/platform/installer/"
Greg Spencer (Chromium) 2011/02/03 04:19:56 This should probably be $SRC_ROOT instead of $GCLI
DaleCurtis 2011/02/03 04:29:45 Done.
33 33 else
34 INSTALL_ROOT=/usr/lib/installer/
35 fi
34 # Load functions and constants for chromeos-install 36 # Load functions and constants for chromeos-install
35 . "/usr/lib/installer/chromeos-common.sh" || \ 37 . "${INSTALL_ROOT}/chromeos-common.sh" || \
36 die "Unable to load /usr/lib/installer/chromeos-common.sh" 38 die "Unable to load ${INSTALL_ROOT}/chromeos-common.sh"
37 39
38 locate_gpt 40 locate_gpt
39 41
40 get_default_board 42 get_default_board
41 43
42 # Flags. 44 # Flags.
43 DEFINE_string board "$DEFAULT_BOARD" \ 45 DEFINE_string board "$DEFAULT_BOARD" \
44 "The board for which the image was built." b 46 "The board for which the image was built." b
45 DEFINE_boolean read_only $FLAGS_FALSE \ 47 DEFINE_boolean read_only $FLAGS_FALSE \
46 "Mount in read only mode -- skips stateful items." 48 "Mount in read only mode -- skips stateful items."
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 FLAGS_from=`eval readlink -f ${FLAGS_from}` 181 FLAGS_from=`eval readlink -f ${FLAGS_from}`
180 FLAGS_rootfs_mountpt=`eval readlink -f ${FLAGS_rootfs_mountpt}` 182 FLAGS_rootfs_mountpt=`eval readlink -f ${FLAGS_rootfs_mountpt}`
181 FLAGS_stateful_mountpt=`eval readlink -f ${FLAGS_stateful_mountpt}` 183 FLAGS_stateful_mountpt=`eval readlink -f ${FLAGS_stateful_mountpt}`
182 184
183 # Perform desired operation. 185 # Perform desired operation.
184 if [ ${FLAGS_unmount} -eq ${FLAGS_TRUE} ] ; then 186 if [ ${FLAGS_unmount} -eq ${FLAGS_TRUE} ] ; then
185 unmount_image 187 unmount_image
186 else 188 else
187 mount_image 189 mount_image
188 fi 190 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698