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

Unified 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: Switch to SRC_ROOT 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mount_gpt_image.sh
diff --git a/mount_gpt_image.sh b/mount_gpt_image.sh
index 1534105182d4455592504814e19bfb9f02685991..87324cbbbe617b8bf986162add7b167d8268fb35 100755
--- a/mount_gpt_image.sh
+++ b/mount_gpt_image.sh
@@ -28,12 +28,14 @@ find_common_sh
. "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
# --- END COMMON.SH BOILERPLATE ---
-# Need to be inside the chroot to load chromeos-common.sh
-assert_inside_chroot
-
+if [ $INSIDE_CHROOT -ne 1 ]; then
+ INSTALL_ROOT="$SRC_ROOT/platform/installer/"
+else
+ INSTALL_ROOT=/usr/lib/installer/
+fi
# Load functions and constants for chromeos-install
-. "/usr/lib/installer/chromeos-common.sh" || \
- die "Unable to load /usr/lib/installer/chromeos-common.sh"
+. "${INSTALL_ROOT}/chromeos-common.sh" || \
+ die "Unable to load ${INSTALL_ROOT}/chromeos-common.sh"
locate_gpt
« 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