mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Updated for file pattern
This commit is contained in:
parent
68f28caaab
commit
d21335832a
1 changed files with 9 additions and 4 deletions
|
@ -32,7 +32,7 @@ class Argparse(Configs):
|
|||
self.args = args
|
||||
self.flags = []
|
||||
self.directory = None
|
||||
self.pattern = None
|
||||
self.file_pattern = None
|
||||
self.dialogbox = DialogBox()
|
||||
self.utils = Utilities()
|
||||
self.usage = Usage()
|
||||
|
@ -80,7 +80,7 @@ class Argparse(Configs):
|
|||
self.args[self.args.index(arg)] = self.flag_directory
|
||||
|
||||
if arg.startswith(self.flag_pattern):
|
||||
self.pattern = arg.split('=')[1]
|
||||
self.file_pattern = arg.split('=')[1]
|
||||
self.args[self.args.index(arg)] = self.flag_pattern
|
||||
|
||||
for opt in self.options:
|
||||
|
@ -188,7 +188,12 @@ class Argparse(Configs):
|
|||
repo_packages = SBoQueries('').sbos()
|
||||
|
||||
# Grab all the installed packages
|
||||
installed = self.utils.all_installed(pattern=f'*{self.sbo_repo_tag}')
|
||||
pattern = f'*{self.sbo_repo_tag}'
|
||||
|
||||
if method == 'find' and self.file_pattern:
|
||||
pattern = self.file_pattern
|
||||
|
||||
installed = self.utils.all_installed(pattern)
|
||||
|
||||
if method in ['remove', 'find']:
|
||||
|
||||
|
@ -391,7 +396,7 @@ class Argparse(Configs):
|
|||
self.check.database()
|
||||
|
||||
find = FindInstalled()
|
||||
find.find(packages, self.pattern)
|
||||
find.find(packages, self.file_pattern)
|
||||
raise SystemExit()
|
||||
self.usage.help(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue