void-packages/srcpkgs/electron19/files/patches/electron-Add-a-script-to-li...

43 lines
1.1 KiB
Diff

From ff4122f236b70c272c746d0c336cdbd588d78cd1 Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
Date: Thu, 12 Dec 2019 16:12:18 -0500
Subject: [PATCH] Add a script to list patch targets
---
script/list_patch_targets.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100755 script/list_patch_targets.py
diff --git a/script/list_patch_targets.py b/script/list_patch_targets.py
new file mode 100755
index 000000000..55173bac9
--- /dev/null
+++ b/script/list_patch_targets.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+import argparse
+import json
+
+
+def parse_args():
+ parser = argparse.ArgumentParser(description='Apply Electron patches')
+ parser.add_argument('config', nargs='+',
+ type=argparse.FileType('r'),
+ help='patches\' config(s) in the JSON format')
+ return parser.parse_args()
+
+
+def main():
+ configs = parse_args().config
+ for config_json in configs:
+ for patch_dir, repo in json.load(config_json).items():
+ print(repo)
+
+
+if __name__ == '__main__':
+ main()
--
2.23.0