summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generate_plugins_path.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/generate_plugins_path.py b/scripts/generate_plugins_path.py
new file mode 100644
index 0000000000..89288244c3
--- /dev/null
+++ b/scripts/generate_plugins_path.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+import argparse
+import os
+import json
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--builddir", help="The meson build directory")
+ parser.add_argument(dest="plugins", help="The list of plugins", nargs="+")
+
+ options = parser.parse_args()
+
+ all_paths = set()
+ for plugin in options.plugins:
+ all_paths.add(os.path.dirname(plugin))
+
+ with open(os.path.join(options.builddir, 'GstPluginsPath.json'), "w") as f:
+ json.dump(list(all_paths), f, indent=4, sort_keys=True)