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

Unified Diff: src/scripts/common.sh

Issue 1736025: Added restart_in_chroot_if_needed to common.sh. (Closed) Base URL: http://src.chromium.org/git/chromiumos.git
Patch Set: Reverted mod_image_for_test.sh and removed line from common.sh. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scripts/build_tests.sh ('k') | src/scripts/run_tests.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/common.sh
diff --git a/src/scripts/common.sh b/src/scripts/common.sh
index 52bf63277954f6ef2ce3fcbc3ae75e540f186b25..accb468aaf15fe79ec422adc0b3aaf0d7aa98cfd 100644
--- a/src/scripts/common.sh
+++ b/src/scripts/common.sh
@@ -207,6 +207,16 @@ function make_pkg_common {
popd
}
+# Enter a chroot and restart the current script if needed
+function restart_in_chroot_if_needed {
+ if [ $INSIDE_CHROOT -ne 1 ]
+ then
+ # Equivalent to enter_chroot.sh -- <current command>
+ exec $SCRIPTS_DIR/enter_chroot.sh -- \
+ $CHROOT_TRUNK_DIR/src/scripts/$(basename $0) $*
+ fi
+}
+
# Fail unless we're inside the chroot. This guards against messing up your
# workstation.
function assert_inside_chroot {
« no previous file with comments | « src/scripts/build_tests.sh ('k') | src/scripts/run_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698