summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-01-29 15:33:34 +0900
committerKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-01-29 15:57:03 +0900
commit9c432b82dd0a450555eff122d448fa4976b2d2b1 (patch)
treee263e868c58a417fcddc5c59f25b6c042b81e100 /scripts
parentf9d68b98e7bc7181eb0680b54e679c8708e950dd (diff)
find.py: add -b option to search BSP
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/find.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/find.py b/scripts/find.py
index e0f6558..d5060cd 100755
--- a/scripts/find.py
+++ b/scripts/find.py
@@ -47,7 +47,7 @@ class find(base.base):
#--------------------
# parse_option
#--------------------
- def parse_option(self, arg, option, char, hit):
+ def parse_option(self, arg, option, tag, hit):
op = "-l" # hit
if (not hit):
@@ -58,13 +58,17 @@ class find(base.base):
if (cmd == option):
match = 1
elif (match):
- # Wolfram,Shimoda
- # ->
- # (Wolfram|Shimoda)
- tgt = "({})".format(cmd.replace(",", "|"))
-
- self.files = self.run("echo \"{}\" | xargs egrep {} \"{}:\s+{}\"".\
- format(self.files, op, char, tgt))
+ if (option == "-b"):
+ tag = cmd
+ tgt = ""
+ else:
+ # Wolfram,Shimoda
+ # ->
+ # (Wolfram|Shimoda)
+ tgt = "\s+({})".format(cmd.replace(",", "|"))
+
+ self.files = self.run("echo \"{}\" | xargs egrep {} \"{}:{}\"".\
+ format(self.files, op, tag, tgt))
return
#--------------------
@@ -118,6 +122,7 @@ class find(base.base):
# -na : not matched assignee
# -t : matched team
# -nt : not matched team
+ # -b : bsp
if (self.files):
self.parse_option(arg, "-s", "status", 1)
self.parse_option(arg, "-ns", "status", 0)
@@ -125,6 +130,7 @@ class find(base.base):
self.parse_option(arg, "-na", "assignee", 0)
self.parse_option(arg, "-t", "team", 1)
self.parse_option(arg, "-nt", "team", 0)
+ self.parse_option(arg, "-b", None, 1)
#--------------------
# get