[darwinbuild-changes] [560] trunk/darwinxref/plugins/resolveDeps.c
source_changes at macosforge.org
source_changes at macosforge.org
Wed Sep 16 17:07:48 PDT 2009
Revision: 560
http://trac.macosforge.org/projects/darwinbuild/changeset/560
Author: wsiegrist at apple.com
Date: 2009-09-16 17:07:44 -0700 (Wed, 16 Sep 2009)
Log Message:
-----------
Fix resolveDeps -commit to work when no project is provided
Modified Paths:
--------------
trunk/darwinxref/plugins/resolveDeps.c
Modified: trunk/darwinxref/plugins/resolveDeps.c
===================================================================
--- trunk/darwinxref/plugins/resolveDeps.c 2009-09-12 19:34:38 UTC (rev 559)
+++ trunk/darwinxref/plugins/resolveDeps.c 2009-09-17 00:07:44 UTC (rev 560)
@@ -43,15 +43,19 @@
if (count > 2) return -1;
char* project = NULL;
int commit = 0;
-
- if (count == 1) {
- project = strdup_cfstr(CFArrayGetValueAtIndex(argv, 0));
- } else if (count > 1) {
- project = strdup_cfstr(CFArrayGetValueAtIndex(argv, 1));
- if (CFEqual(CFSTR("-commit"), CFArrayGetValueAtIndex(argv, 0)))
+
+ if (count > 0) {
+ if (CFEqual(CFSTR("-commit"), CFArrayGetValueAtIndex(argv, 0))) {
commit = 1;
+ } else {
+ project = strdup_cfstr(CFArrayGetValueAtIndex(argv, 0));
+ }
}
+ if (count > 1) {
+ project = strdup_cfstr(CFArrayGetValueAtIndex(argv, 1));
+ }
+
char* build = strdup_cfstr(DBGetCurrentBuild());
resolve_dependencies(build, project, commit);
free(project);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20090916/e4b371ea/attachment.html>
More information about the darwinbuild-changes
mailing list