mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 16:22:55 +00:00
Add --config argument
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
parent
657b11d05a
commit
370301a702
1 changed files with 7 additions and 4 deletions
|
@ -35,13 +35,16 @@ def main():
|
|||
parser.add_argument('-S', '--sig', help='Operate as a CentOS SIG user instead of using the Stream distro environment',
|
||||
default=False,
|
||||
action='store_true')
|
||||
parser.add_argument('-C', '--config', help='Specify a config file to use')
|
||||
|
||||
|
||||
(args, other) = parser.parse_known_args()
|
||||
|
||||
if args.sig:
|
||||
args.config = '/etc/rpkg/centpkg-sig.conf'
|
||||
else:
|
||||
args.config = '/etc/rpkg/centpkg.conf'
|
||||
if not args.config:
|
||||
if args.sig:
|
||||
args.config = '/etc/rpkg/centpkg-sig.conf'
|
||||
else:
|
||||
args.config = '/etc/rpkg/centpkg.conf'
|
||||
|
||||
# Make sure we have a sane config file
|
||||
if not os.path.exists(args.config) and not other[-1] in ['--help', '-h', 'help']:
|
||||
|
|
Loading…
Add table
Reference in a new issue