Skip to content

Commit 9559bbc

Browse files
committed
extract_utils: allow standlone script to extract additional partitions
As opposed to replacing the default ones. Change-Id: I21d23cbe526974651101646dce59df6eff782371
1 parent c169461 commit 9559bbc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

extract.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
help='Partitions to extract',
3131
default=DEFAULT_EXTRACTED_PARTITIONS,
3232
)
33+
parser.add_argument(
34+
'--extra-partitions',
35+
nargs='+',
36+
type=str,
37+
help='Extra partitions to extract',
38+
)
3339

3440
parser.add_argument(
3541
'source',
@@ -41,9 +47,13 @@
4147
if __name__ == '__main__':
4248
args = parser.parse_args()
4349

50+
extract_partitions = args.partitions
51+
if args.extra_partitions is not None:
52+
extract_partitions += args.extra_partitions
53+
4454
ctx = ExtractCtx(
4555
keep_dump=True,
46-
extract_partitions=args.partitions,
56+
extract_partitions=extract_partitions,
4757
)
4858

4959
with get_dump_dir(args.source, ctx) as dump_dir:

0 commit comments

Comments
 (0)