r1656 - dev/concept/moongoo

neocool at linuxfromscratch.org neocool at linuxfromscratch.org
Tue Dec 14 17:15:59 PST 2004


Author: neocool
Date: 2004-12-14 18:15:59 -0700 (Tue, 14 Dec 2004)
New Revision: 1656

Modified:
   dev/concept/moongoo/Makefile
   dev/concept/moongoo/moongoo.c
Log:
Update.


Modified: dev/concept/moongoo/Makefile
===================================================================
--- dev/concept/moongoo/Makefile	2004-12-15 00:43:48 UTC (rev 1655)
+++ dev/concept/moongoo/Makefile	2004-12-15 01:15:59 UTC (rev 1656)
@@ -4,10 +4,10 @@
 OBJS=build.o moongoo.o plugin.o url.o
 
 ifeq ($(OPTS),)
-OPTS=-o help
+OPTS=-s ass -o ass_out
 #OPTS+=~/projects/alfs/book/index.xml
 #OPTS+=~/projects/alfs/lfs-profile/LFS.xml
-#OPTS+=~/projects/alfs/ass/index.xml
+OPTS+=~/projects/alfs/ass/index.xml
 #OPTS+=~/projects/hive/unstable/profile.xml
 #OPTS+=~/projects/alfs/blfs/index.xml
 #OPTS+=~/projects/alfs/hlfs/index.xml

Modified: dev/concept/moongoo/moongoo.c
===================================================================
--- dev/concept/moongoo/moongoo.c	2004-12-15 00:43:48 UTC (rev 1655)
+++ dev/concept/moongoo/moongoo.c	2004-12-15 01:15:59 UTC (rev 1656)
@@ -13,6 +13,7 @@
 int main (int argc, char **argv)
 {
 	char c, *syn = DEF_SYN, *moo_xml = MOO_XML, *plug_dir = PLUG_DIR, *f;
+	char *out = NULL;
 	bool quiet = false, build = false;
 	int i = 0, ret = 0;
 	xmlDocPtr doc = NULL;
@@ -89,8 +90,8 @@
 					print_plugs(writers, NULL);
 					goto cleanup;
 				}
-				/*syn = (char *)malloc(strlen(optarg)+1);
-				strcpy(syn, optarg);*/
+				out = (char *)malloc(strlen(optarg)+1);
+				strcpy(out, optarg);
 				break;
 		}
 	}
@@ -133,6 +134,26 @@
 		goto cleanup;
 	}
 
+	if (out)
+	{
+		if (!writers)
+		{
+			fprintf(stderr, "No output plugins available.\n");
+			ret=2;
+			goto cleanup;
+		}
+		
+		i=0;
+		while (writers[i].path)
+		{
+			if (!strcmp(out, plugarg(writers[i].path)))
+				writers[i].info->write_prof(prof, NULL);
+			i++;
+		}
+		
+		goto cleanup;
+	}
+	
 	if (build)
 		build_pkg(prof->ch[0].pkg[0]);
 




More information about the alfs-log mailing list