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

Unified Diff: common.sh

Issue 5946003: Make restart_in_chroot_if_needed run against scripts that are symlinks (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 10 years 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: common.sh
diff --git a/common.sh b/common.sh
index a11f2572899ed6885699745aa73f8d32e90e79bb..32cf4b39f74d8b261df668838208056b5786f420 100644
--- a/common.sh
+++ b/common.sh
@@ -234,12 +234,9 @@ function restart_in_chroot_if_needed {
# NB: Pass in ARGV: restart_in_chroot_if_needed "$@"
if [ $INSIDE_CHROOT -ne 1 ]
then
- local abspath=$(readlink -f "$0")
- # strip everything up to (and including) /src/scripts/ from abspath
- local path_from_scripts="${abspath##*/src/scripts/}"
+ # Equivalent to enter_chroot.sh -- <current command>
exec $SCRIPTS_DIR/enter_chroot.sh -- \
- "$CHROOT_TRUNK_DIR/src/scripts/$path_from_scripts" "$@"
- exit
+ $CHROOT_TRUNK_DIR/src/scripts/$(basename $0) $*
diandersAtChromium 2010/12/16 22:54:10 Should still be "$@", right?
Greg Spencer (Chromium) 2010/12/17 00:19:24 I agree, it should be.
fi
}
« 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