mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-12 15:36:58 +02:00
cros_workon: fix forall (broken by --host) :/
Review URL: http://codereview.chromium.org/2966016
This commit is contained in:
parent
f9a42ed40b
commit
014939b2c7
10
cros_workon
10
cros_workon
@ -50,10 +50,12 @@ shift
|
|||||||
|
|
||||||
if [ -n "${FLAGS_board}" ]; then
|
if [ -n "${FLAGS_board}" ]; then
|
||||||
BOARD_DIR=/build/"${FLAGS_board}" # --board specified
|
BOARD_DIR=/build/"${FLAGS_board}" # --board specified
|
||||||
EQUERY=equery-"${FLAGS_board}"
|
EQUERYCMD=equery-"${FLAGS_board}"
|
||||||
|
EBUILDCMD=ebuild-"${FLAGS_board}"
|
||||||
else
|
else
|
||||||
BOARD_DIR="" # --host specified
|
BOARD_DIR="" # --host specified
|
||||||
EQUERY=equery
|
EQUERYCMD=equery
|
||||||
|
EBUILDCMD=ebuild
|
||||||
fi
|
fi
|
||||||
|
|
||||||
KEYWORDS_DIR=${BOARD_DIR}/etc/portage/package.keywords
|
KEYWORDS_DIR=${BOARD_DIR}/etc/portage/package.keywords
|
||||||
@ -71,7 +73,7 @@ canonicalize_name () {
|
|||||||
local pkgfile
|
local pkgfile
|
||||||
local pkgname
|
local pkgname
|
||||||
|
|
||||||
if ! pkgfile=$(${EQUERY} which $1); then
|
if ! pkgfile=$(${EQUERYCMD} which $1); then
|
||||||
warn "error looking up package $1" 1>&2
|
warn "error looking up package $1" 1>&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -147,7 +149,7 @@ ebuild_forall() {
|
|||||||
|
|
||||||
for atom in ${atoms}; do
|
for atom in ${atoms}; do
|
||||||
info "Running \"${FLAGS_command}\" on ${atom}"
|
info "Running \"${FLAGS_command}\" on ${atom}"
|
||||||
eval $(ebuild-${FLAGS_board} $(${EQUERY} which ${atom}) info)
|
eval $(${EBUILDCMD} $(${EQUERYCMD} which ${atom}) info)
|
||||||
(cd "${CROS_WORKON_SRCDIR}" && bash -c "${FLAGS_command}")
|
(cd "${CROS_WORKON_SRCDIR}" && bash -c "${FLAGS_command}")
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user