summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2024-12-09 23:30:24 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-12-09 23:30:24 +0000
commit97364210bd7704ceb994c57f35fd945b743ed478 (patch)
treeb0b567b5b5e200fe7235a829ee8fbfe1be34fe0e
parent22231523dc60192b15234df42cde4ee63754f7fe (diff)
parent91928aa515fd5db92f30c8431e032736177e1c25 (diff)
Merge "Slightly tweak the "extract" script." into main
-rwxr-xr-xravenwood/scripts/extract-last-soong-commands.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ravenwood/scripts/extract-last-soong-commands.py b/ravenwood/scripts/extract-last-soong-commands.py
index bdc1de0c44f4..c08d4aa799a5 100755
--- a/ravenwood/scripts/extract-last-soong-commands.py
+++ b/ravenwood/scripts/extract-last-soong-commands.py
@@ -48,6 +48,7 @@ def main(args):
with open(outfile, "w") as out:
out.write(HEADER)
+ count = 0
with gzip.open(log) as f:
for line in f:
s = line.decode("utf-8")
@@ -63,7 +64,8 @@ def main(args):
if m:
command = m.groups()[0]
- out.write('#========\n')
+ count += 1
+ out.write(f'### Command {count} ========\n')
# Show the full command line before executing it.
out.write('#echo ' + shlex.quote(command) + '\n')