Browse Source

added ability to pass through command-line arguments (maybe -- untested)

jmelesky 7 years ago
parent
commit
90b52b8c15
1 changed files with 8 additions and 1 deletions
  1. 8 1
      punt

+ 8 - 1
punt

@@ -43,16 +43,23 @@ if __name__ == '__main__':
     parser_install = subparsers.add_parser('install', help='Run an program that installs software')
     parser_install.add_argument('bottle', help="the name of the bottle")
     parser_install.add_argument('app', help="the path to the windows installer to run")
+    parser_install.add_argument('arg', nargs='*', help="any command-line arguments to pass to the windows installer")
 
     parser_list = subparsers.add_parser('list', help='List all bottles managed by punt')
 
     parser_run = subparsers.add_parser('run', help='Run an installed app')
+    parser_run.add_argument('bottle', help="the name of the bottle")
+    parser_run.add_argument('app', help="the path to the windows installer to run")
+    parser_run.add_argument('arg', nargs='*', help="any command-line arguments to pass to the windows app")
 
     parser_delete = subparsers.add_parser('delete', help='Delete a specific bottle')
 
     args = parser.parse_args()
 
-    run(args.bottle, args.app)
+    if 'arg' in var(args):
+        run(args.bottle, args.app, args.arg)
+    else:
+        run(args.bottle, args.app, [])