| OLD | NEW |
| (Empty) |
| 1 #!/bin/bash | |
| 2 | |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 # This script moves ebuilds between 'stable' and 'live' states. | |
| 8 # By default 'stable' ebuilds point at and build from source at the | |
| 9 # last known good commit. Moving an ebuild to 'live' (via cros_workon start) | |
| 10 # is intended to support development. The current source tip is fetched, | |
| 11 # source modified and built using the unstable 'live' (9999) ebuild. | |
| 12 | |
| 13 # --- BEGIN COMMON.SH BOILERPLATE --- | |
| 14 # Load common CrOS utilities. Inside the chroot this file is installed in | |
| 15 # /usr/lib/crosutils. Outside the chroot we find it relative to the script's | |
| 16 # location. | |
| 17 find_common_sh() { | |
| 18 local common_paths=(/usr/lib/crosutils $(dirname "$(readlink -f "$0")")) | |
| 19 local path | |
| 20 | |
| 21 SCRIPT_ROOT= | |
| 22 for path in "${common_paths[@]}"; do | |
| 23 if [ -r "${path}/common.sh" ]; then | |
| 24 SCRIPT_ROOT=${path} | |
| 25 break | |
| 26 fi | |
| 27 done | |
| 28 } | |
| 29 | |
| 30 find_common_sh | |
| 31 . "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1) | |
| 32 # --- END COMMON.SH BOILERPLATE --- | |
| 33 | |
| 34 die "error: Please run cros_workon from chroot:/usr/bin/cros_workon" | |
| OLD | NEW |