SF.net SVN: morphix: [2288] trunk/mmaker/debian

[email protected]
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
Revision: 2288
Author:   alextreme
Date:     2006-06-03 15:00:49 -0700 (Sat, 03 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/morphix/?rev=2288&view=rev

Log Message:
-----------
  * fixing command-tag

Modified Paths:
--------------
    trunk/mmaker/debian/changelog
    trunk/mmaker/libmorphix/makemodule.c
Modified: trunk/mmaker/debian/changelog
===================================================================
--- trunk/mmaker/debian/changelog	2006-06-02 21:32:46 UTC (rev 2287)
+++ trunk/mmaker/debian/changelog	2006-06-03 22:00:49 UTC (rev 2288)
@@ -1,3 +1,15 @@
+morphix-mmaker (0.4-29) unstable; urgency=low
+
+  * fixed <command>
+
+ -- root <[email protected]>  Sat,  3 Jun 2006 23:58:08 +0200
+
+morphix-mmaker (0.4-28) unstable; urgency=low
+
+  * added <command>
+
+ -- root <[email protected]>  Thu,  1 Jun 2006 22:47:32 +0200
+
 morphix-mmaker (0.4-27) unstable; urgency=low
 
   * added -n minimod.xml (via morphmini)

Modified: trunk/mmaker/libmorphix/makemodule.c
===================================================================
--- trunk/mmaker/libmorphix/makemodule.c	2006-06-02 21:32:46 UTC (rev 2287)
+++ trunk/mmaker/libmorphix/makemodule.c	2006-06-03 22:00:49 UTC (rev 2288)
@@ -538,6 +538,9 @@
 
 gboolean executeCommands(mmodule *module, gchar *dirname) {
 	GList *ptr = module->commandlist;
+	gchar *filename = g_strdup_printf("%s/commands.sh", module->dirname);
+	int file;
+
 	while (ptr != NULL) {
 		gchar *cmdline = NULL;
 		gchar *command = ptr->data;
@@ -545,16 +548,24 @@
 		if (command == NULL)
 			continue;
 
-		cmdline = g_strdup_printf("%s %s %s",P_CHROOT,module->dirname,command);
+		g_file_set_contents(filename, command, -1, NULL);
+
+		cmdline = g_strdup_printf("%s %s sh ./commands.sh",P_CHROOT,module->dirname);
 		if (!ExecuteCommand(cmdline)) {
 			fprintf(stderr,"Warning: unable to execute command: %s\n", command);
 			g_free(command);
 			g_free(cmdline);
 			continue;
 		}
+
+		unlink(filename);
+
 		g_free(cmdline);
 		ptr = ptr->next;
 	}
+	
+	g_free(filename);
+
 	return TRUE;
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.