keyfunc.sh.in, extract-profile.in: Put profile name before the filenames.
[distorted-keys] / extract-profile.in
index 1d19fc2..c3a224b 100755 (executable)
@@ -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') }