Skip to content
Snippets Groups Projects
Commit 8b052d98 authored by Aurélien Dunand's avatar Aurélien Dunand Committed by Seblu
Browse files

Add Unix globbing capability for repo_filter

parent 455c71b1
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ InstallSystems Command line Tool ...@@ -9,6 +9,7 @@ InstallSystems Command line Tool
import os import os
import time import time
import fnmatch
import datetime import datetime
import argparse import argparse
import installsystems import installsystems
...@@ -37,10 +38,11 @@ def load_repositories(args): ...@@ -37,10 +38,11 @@ def load_repositories(args):
else: else:
# from config # from config
for repoconf in RepoConfigFile(args.repo_config).repos: for repoconf in RepoConfigFile(args.repo_config).repos:
# filtering on repository name if present if args.repo_filter is None:
if args.repo_filter is not None and repoconf.name != args.repo_filter: repoman.register(repoconf)
continue else:
repoman.register(repoconf) if len(fnmatch.filter([repoconf.name], args.repo_filter)) > 0:
repoman.register(repoconf)
return repoman return repoman
def c_new(parser, args): def c_new(parser, args):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment