diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2019-09-17 15:53:40 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2020-03-04 08:18:09 -0500 |
commit | 7cf00627beaa3e0aec12df6e70282bd981c792b3 (patch) | |
tree | cea416628a3c43e01b152adfc0407b7fa60f34fa /scripts | |
parent | 6dfcecb16a13980b4650a7c9e6102e8d71fc3f7b (diff) | |
download | gstreamer-7cf00627beaa3e0aec12df6e70282bd981c792b3.tar.gz |
Simplify generate_plugins_path.py script
This also fix an empty plugin name being prepended to the list.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/generate_plugins_path.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/generate_plugins_path.py b/scripts/generate_plugins_path.py index d57c60c2fe..17a38f123b 100644 --- a/scripts/generate_plugins_path.py +++ b/scripts/generate_plugins_path.py @@ -6,14 +6,14 @@ 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") + parser.add_argument(dest="output", help="Output file") + parser.add_argument(dest="plugins", nargs=argparse.REMAINDER, help="The list of plugins") options = parser.parse_args() all_paths = set() - for plugin in options.plugins.split(os.pathsep): + for plugin in options.plugins: all_paths.add(os.path.dirname(plugin)) - with open(os.path.join(options.builddir, 'GstPluginsPath.json'), "w") as f: + with open(options.output, "w") as f: json.dump(list(all_paths), f, indent=4, sort_keys=True) |