mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-27 13:31:56 +01:00
Create common script file for workon tools. Planning on using in another CL.
Review URL: http://codereview.chromium.org/3022010
This commit is contained in:
parent
3a1cf2061f
commit
8b61e59b14
17
cros_workon
17
cros_workon
@ -14,6 +14,9 @@
|
||||
# The path to common.sh should be relative to your script's location.
|
||||
. "$(dirname "$0")/common.sh"
|
||||
|
||||
# Load common functions for workon scripts.
|
||||
. "$(dirname "$0")/lib/cros_workon_common.sh"
|
||||
|
||||
# Script must be run inside the chroot
|
||||
restart_in_chroot_if_needed $*
|
||||
get_default_board
|
||||
@ -154,20 +157,6 @@ ebuild_iterate() {
|
||||
done
|
||||
}
|
||||
|
||||
show_workon_ebuilds() {
|
||||
pushd "${BOARD_DIR}"/etc/ 1> /dev/null
|
||||
source make.conf
|
||||
popd 1> /dev/null
|
||||
local CROS_OVERLAYS="${PORTDIR_OVERLAY}"
|
||||
|
||||
for overlay in ${CROS_OVERLAYS}; do
|
||||
pushd ${overlay} 1> /dev/null
|
||||
find . -name '*.ebuild' | xargs fgrep cros-workon | \
|
||||
awk -F / '{ print $2 "/" $3 }' | uniq | sort
|
||||
popd 1> /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
# --all makes commands operate on different lists
|
||||
if [ ${FLAGS_all} = "${FLAGS_TRUE}" ]; then
|
||||
case ${WORKON_CMD} in
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user