flatcar-scripts/chroot_version_hooks.d/2_path_update
Ryan Cui 780933db56 Add chroot version 2 upgrade script
Add script that adds depot_tools and chromite/bin to the PATH globally using /etc/env.d

BUG=16093
TEST=Ran make_chroot and run_chroot_version_hooks

Change-Id: I6011d7436f18ce46dfe215f01068e862d2567273
Reviewed-on: http://gerrit.chromium.org/gerrit/2022
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
2011-06-03 15:32:08 -07:00

16 lines
446 B
Plaintext

# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
target="/etc/env.d/99chromiumos"
sudo_clobber "${target}" <<EOF
PATH=/home/$USER/trunk/chromite/bin:/home/$USER/depot_tools
CROS_WORKON_SRCROOT=/home/$USER/trunk
PORTAGE_USERNAME=$USER
EOF
sudo env-update
info "Chroot upgraded to version 2: PATH is updated globally"
exit 0