mirror of
https://github.com/munki/munki.git
synced 2026-01-26 17:09:30 -06:00
munkiimport: Specify catalogs from the command-line
Add a --catalog option so that we can specify the default catalogs to use from the command-line. Multiple catalogs can be specified by specifying the option multiple times.
This commit is contained in:
@@ -517,6 +517,8 @@ def main():
|
||||
p.add_option('--nointeractive', '-n', action='store_true',
|
||||
help="""No interactive prompts. May cause a failure
|
||||
if repo path is unavailable.""")
|
||||
p.add_option('--catalog', default=[], action='append',
|
||||
help="""Specify target catalogs. (default: prompt)""")
|
||||
p.add_option('--version', '-V', action='store_true',
|
||||
help='Print the version of the munki tools and exit.')
|
||||
|
||||
@@ -646,7 +648,10 @@ def main():
|
||||
pkginfo.get(key,'').encode('UTF-8')))
|
||||
if newvalue:
|
||||
pkginfo[key] = newvalue
|
||||
|
||||
|
||||
if options.catalog:
|
||||
pkginfo['catalogs'] = options.catalog
|
||||
|
||||
newvalue = raw_input('%15s [%s]: ' % ('Catalogs',
|
||||
', '.join(pkginfo['catalogs'])))
|
||||
if newvalue:
|
||||
|
||||
Reference in New Issue
Block a user