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

Side by Side Diff: lib/cros_workon_common.sh

Issue 6347052: cros_workon: collapse cros_workon_common.sh (Closed) Base URL: http://git.chromium.org/git/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cros_workon ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 # Common library for functions used by workon tools.
8
9 find_keyword_workon_ebuilds() {
10 keyword="${1}"
11
12 pushd "${BOARD_DIR}"/etc/ 1> /dev/null
13 source make.conf
14 popd 1> /dev/null
15 local CROS_OVERLAYS="${PORTDIR_OVERLAY}"
16
17 # NOTE: overlay may be a symlink, and we have to use ${overlay}/
18 for overlay in ${CROS_OVERLAYS}; do
19 # only look up ebuilds named 9999 to eliminate duplicates
20 find ${overlay}/ -name '*9999.ebuild' | \
21 xargs grep -l "inherit.*cros-workon" | \
22 xargs grep -l "KEYWORDS=.*${keyword}.*"
23 done
24 }
25
26 show_workon_ebuilds() {
27 keyword=$1
28
29 find_keyword_workon_ebuilds ${keyword} | \
30 sed -e 's/.*\/\([^/]*\)\/\([^/]*\)\/.*\.ebuild/\1\/\2/' | \
31 sort -u
32 # This changes the absolute path to ebuilds into category/package.
33 }
OLDNEW
« no previous file with comments | « cros_workon ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698