Move the build sets to .bset naming.

This commit is contained in:
Chris Johns
2012-11-05 15:28:36 +11:00
parent 4882ff3655
commit e9af460249
3 changed files with 14 additions and 11 deletions

View File

@@ -431,15 +431,15 @@ class build:
package = packages['main']
return package.name()
def list_configs(opts, _defaults):
def list_configs(opts, _defaults, ext = '.cfg'):
configs = []
for cp in opts.expand('%{_configdir}', _defaults).split(':'):
print 'Examining: %s' % (os.path.abspath(cp))
configs += glob.glob(os.path.join(cp, '*.cfg'))
configs += glob.glob(os.path.join(cp, '*%s' % (ext)))
for c in sorted(configs):
config = os.path.basename(c)
if config.endswith('.cfg'):
config = config[:-4]
if config.endswith(ext):
config = config[:0 - len(ext)]
print ' ', config
def run(args):