commit: 9d1e5b64beeb74357fb3305fb14e3884fa26ec84
parent a1c8c0312c25e8dbd93951b4298063a8d1a453bb
Author: Dor Askayo <dor.askayo@gmail.com>
Date: Fri, 13 Jan 2023 15:57:22 +0200
Add a script to generate source manifests
The source manifest can be used by external tools to download source
files externally before initiating the bootstrap process.
The script prints the source manifest to stdout.
Diffstat:
1 file changed, 34 insertions(+), 0 deletions(-)
diff --git a/source-manifest.py b/source-manifest.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+"""
+A helper application used to get a list of source files required
+for the bootstrapping process.
+"""
+
+# SPDX-License-Identifier: GPL-3.0-or-later
+# SPDX-FileCopyrightText: 2023 Dor Askayo <dor.askayo@gmail.com>
+
+import argparse
+
+from sysa import SysA
+from sysc import SysC
+
+def main():
+ parser = argparse.ArgumentParser()
+
+ parser.add_argument("-s", "--system",
+ help="Generate source manifest for the specified systems",
+ choices=["sysa", "sysc"],
+ nargs="+",
+ action="extend",
+ required=True)
+
+ args = parser.parse_args()
+
+ if "sysa" in args.system:
+ print(SysA.get_source_manifest())
+
+ if "sysc" in args.system:
+ print(SysC.get_source_manifest())
+
+if __name__ == "__main__":
+ main()