]> git.ozlabs.org Git - ccan/blobdiff - tools/create_dep_tar.c
Rename string to str, and split into three modules.
[ccan] / tools / create_dep_tar.c
index 74fdb5692461a3976b799ab1797b67d9ccd6dfe4..ecf043c56fbddf3df03773deabb5719ca1c62c62 100644 (file)
@@ -4,7 +4,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <sqlite3.h>
-#include "ccan/string/string.h"
+#include "ccan/grab_file/grab_file.h"
+#include "ccan/str_talloc/str_talloc.h"
 #include "ccan/talloc/talloc.h"
 #include "tools/_infotojson/database.h"
 
@@ -53,7 +54,7 @@ create_tar(char **deps, const char *dir, const char *targetdir)
        
        if (deps != NULL) {
                cmd_args = strjoin(NULL, deps, " ");    
-               cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s_dependencies.tar %s %s", targetdir, module, cmd_args, dir);
+               cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s_with_deps.tar %s %s", targetdir, module, cmd_args, dir);
        } else 
                cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s.tar %s", targetdir, module, dir);
                        
@@ -61,7 +62,7 @@ create_tar(char **deps, const char *dir, const char *targetdir)
        if (!p)
                err(1, "Executing '%s'", cmd);
 
-       buffer = grab_fd(NULL, fileno(p));
+       buffer = grab_fd(NULL, fileno(p), NULL);
        if (!buffer)
                err(1, "Reading from '%s'", cmd);
        pclose(p);