Add shorthand for --wait-after-config
[mass-build.git] / mass_build.py
index 0060da2c5118597ab24eba73a82d9c2a648bc203..5e89f4098a2472f3e289f3a872eca930cac704be 100755 (executable)
@@ -28,7 +28,7 @@ class Project:
                # VCS
                vcsName = config['vcs']
                if vcsName == 'git':
-                       self.vcs = vcs.Git(self.sourceFolder(), config['url'], config['version'])
+                       self.vcs = vcs.Git(self.sourceFolder(), config)
                elif vcsName == 'svn':
                        self.vcs = vcs.SVN(self.sourceFolder(), config['url'])
                else:
@@ -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__