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

Unified Diff: common.sh

Issue 6480005: Update chroot for chromite if needed. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: 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 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 5f3495fdbb5dd942d6ee75a39547d282b014b3a1..991e6e04e954be464f534708f8fdc57b3c353a2e 100644
--- a/common.sh
+++ b/common.sh
@@ -569,6 +569,19 @@ chroot_hacks_from_outside() {
info "Upgrading old chroot (pre 2010-10-19) - adding root to sudoers"
sudo bash -c "echo root ALL=\(ALL\) ALL >> \"${chroot_dir}/etc/sudoers\""
fi
+
+ # Add chromite stuff if not already done.
+ if ! grep -q "^PATH=.*/trunk/chromite/bin" "${chroot_dir}/home/$USER/.bashrc"; then
rochberg 2011/02/09 22:00:16 CHROOT_HOME="${chroot_dir}/home/$USER" would fix b
+ info "Upgrading old chroot (pre 2011-02-09) - adding chromite to path"
+ echo "PATH=\$PATH:/home/$USER/trunk/chromite/bin" >> \
+ "${chroot_dir}/home/$USER/.bashrc"
+ fi
+ if ! [ -L "${chroot_dir}/home/$USER/.local/lib/python2.6/site-packages/chromite" ]; then
diandersAtChromium 2011/02/09 21:53:07 Is there a good way to wrap this line? ...or are
+ info "Upgrading old chroot (pre 2011-02-09) - adding chromite to site-packages"
+ mkdir -p "${chroot_dir}/home/$USER/.local/lib/python2.6/site-packages"
+ ln -s ../../../../trunk/chromite \
+ "${chroot_dir}/home/$USER/.local/lib/python2.6/site-packages/"
+ fi
}
# The board and variant command line options can be used in a number of ways
« 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