diff options
Diffstat (limited to 'pkgs/common-updater/scripts')
-rwxr-xr-x | pkgs/common-updater/scripts/list-directory-versions | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/common-updater/scripts/list-directory-versions b/pkgs/common-updater/scripts/list-directory-versions index cf2f0adbd43e..c713578beefb 100755 --- a/pkgs/common-updater/scripts/list-directory-versions +++ b/pkgs/common-updater/scripts/list-directory-versions @@ -26,6 +26,8 @@ parser.add_argument( parser.add_argument("--url", help="url of the page that lists the package versions") parser.add_argument("--file", help="file name for writing debugging information") +parser.add_argument("--extra-regex", help="additional regex to filter versions with") + if __name__ == "__main__": args = parser.parse_args() @@ -62,4 +64,6 @@ if __name__ == "__main__": rf"(.*/)?{args.pname}-([\d.]+?(-[\d\w.-]+?)?)(\.tar)?(\.[^.]*)", link_url ) if match: - print(match.group(2)) + version = match.group(2) + if (not args.extra_regex) or re.fullmatch(args.extra_regex, version): + print(version) |