X-Git-Url: https://git.distorted.org.uk/~mdw/distorted-keys/blobdiff_plain/f5d867ffbd455876112df5b5e5ba5092793a8556..b65e1f934c6951c5943634f38ae4098573b94b0f:/extract-profile.in diff --git a/extract-profile.in b/extract-profile.in index 1d19fc2..c3a224b 100755 --- a/extract-profile.in +++ b/extract-profile.in @@ -403,7 +403,7 @@ def parse(filename, d): ### Main program. OP = O.OptionParser( - usage = '%prog FILE|DIRECTORY ... SECTION', + usage = '%prog SECTION FILE|DIRECTORY ...', version = '%%prog, version %s' % VERSION, description = '''\ Parse the configurations FILE and DIRECTORY contents, and output the named @@ -417,8 +417,8 @@ def main(args): opts, args = OP.parse_args(args[1:]) if len(args) < 2: OP.error('not enough positional parameters') - files = args[:-1] - sect = args[-1] + sect = args[0] + files = args[1:] ## Read in the inputs. d = { '@GLOBAL': Section('@GLOBAL') }