diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-03-14 15:01:02 -0700 |
---|---|---|
committer | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-03-14 16:24:59 -0700 |
commit | 7083079297ea072a5a76b07ab53785372442d01f (patch) | |
tree | 7dec28d14b25d450cb12b5c6401f442a87363835 /scripts | |
parent | 28956117d173b478d6e47b570aa05ea38d605976 (diff) |
list-targets accepts TARGET_REQUIRE_TAGS as filter
make list-targets TARGET_REQUIRE_TAGS="tag1 tag2 tag3" will list only
the BSPs with all of the requested tags.
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/filter-targets | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/filter-targets b/scripts/filter-targets new file mode 100755 index 0000000..580a433 --- /dev/null +++ b/scripts/filter-targets @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e +set -o pipefail + +unset tag +unset bsp_dir +unset all_settings + +bsp_dir="$1" +shift 1 + +all_settings=`find ${bsp_dir} -name settings.mk` + +while [[ "$1" != "" ]] +do + all_settings=`grep -le "TARGET_TAGS.*=.*$1.*" ${all_settings}` + shift 1 +done + +echo ${all_settings} |