30 lines
761 B
Python
30 lines
761 B
Python
|
import argparse
|
||
|
|
||
|
from typing import Sequence
|
||
|
|
||
|
from many_repos.config import load_config
|
||
|
from many_repos import common
|
||
|
|
||
|
def _add_specific_args(parser: argparse.ArgumentParser):
|
||
|
parser.add_argument("-s", "--source", action="append")
|
||
|
|
||
|
|
||
|
def main(argv: Sequence[str] | None = None) -> int:
|
||
|
parser = argparse.ArgumentParser(
|
||
|
description=(
|
||
|
"Clone all repositores into `output_dir` from every source, unless specified "
|
||
|
"otherwise using one or multiple `--source SOURCE` / `-s SOURCE` ."
|
||
|
)
|
||
|
)
|
||
|
|
||
|
_add_specific_args(parser)
|
||
|
common.add_common_args(parser)
|
||
|
|
||
|
args = parser.parse_args(argv)
|
||
|
|
||
|
config = load_config(args.config_filename)
|
||
|
return 0
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
raise SystemExit(main())
|