Fix shorthand form of --wait argument
[mass-build.git] / mass_build.py
index 1732565259b308d04f93451eb8aecd2542e02fe0..814fa3efa397901af2452cc3d8c64660359d3f65 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 # mass-build - Easily Build Software Involving a Large Amount of Source Repositories
-# Copyright (C) 2012 Ralf Jung <post@ralfj.de>
+# Copyright (C) 2012-2013 Ralf Jung <post@ralfj.de>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ parser.add_argument("-c, --config",
 parser.add_argument("--reconfigure",
                     action="store_true", dest="reconfigure",
                     help="Force configuration to be run")
-parser.add_argument("--wait-after-config",
+parser.add_argument("-w", "--wait-after-config",
                     action="store_true", dest="wait_after_config",
                     help="Wait for user confirmation after configuration is finished")
 parser.add_argument("--reset-source",
@@ -75,6 +75,8 @@ parser.add_argument("--check-versions",
 parser.add_argument("projects",  metavar='PROJECT', nargs='*',
                     help="Manually specify projects or folders to be built (project names take precedence)")
 args = parser.parse_args()
+if args.reset_source and not args.update:
+       raise Exception("Can not reset sources without doing an update")
 
 # load config
 config = imp.load_source('config', args.config).__dict__