Skip to content

Commit b215d76

Browse files
Added command line option --skip <library name>
1 parent 254e1ab commit b215d76

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bootstrap.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ def printOptions():
445445
print(" --name-file, -N Specifies a file that contains a (sub)set of libraries")
446446
print(" to be downloaded. One library name per line; lines")
447447
print(" starting with '#' are considered comments.")
448+
print(" --skip Specifies a name of a single library to be skipped")
448449
print(" --clean, -c Remove library directory before obtaining library")
449450
print(" --clean-all, -C Implies --clean, and also forces re-download of cached")
450451
print(" archive files")
@@ -483,7 +484,7 @@ def main(argv):
483484
opts, args = getopt.getopt(
484485
argv,
485486
"ln:N:cCb:h",
486-
["list", "name=", "name-file=", "clean", "clean-all", "base-dir", "bootstrap-file=",
487+
["list", "name=", "name-file=", "skip=", "clean", "clean-all", "base-dir", "bootstrap-file=",
487488
"local-bootstrap-file=", "use-tar", "use-unzip", "repo-snapshots", "fallback-url=",
488489
"force-fallback", "debug-output", "help", "break-on-first-error"])
489490
except getopt.GetoptError:
@@ -492,6 +493,7 @@ def main(argv):
492493

493494
opt_names = []
494495
name_files = []
496+
skip_libs = []
495497
opt_clean = False
496498
opt_clean_archives = False
497499
list_libraries = False
@@ -515,6 +517,8 @@ def main(argv):
515517
opt_names.append(arg)
516518
if opt in ("-N", "--name-file"):
517519
name_files.append(os.path.abspath(arg))
520+
if opt in ("--skip",):
521+
skip_libs.append(arg)
518522
if opt in ("-c", "--clean"):
519523
opt_clean = True
520524
if opt in ("-C", "--clean-all"):
@@ -651,6 +655,9 @@ def main(argv):
651655
source = library.get('source', None)
652656
post = library.get('postprocess', None)
653657

658+
if (skip_libs) and (name in skip_libs):
659+
continue
660+
654661
if (opt_names) and (not name in opt_names):
655662
continue
656663

0 commit comments

Comments
 (0)