#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"
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);
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);
printf("creating tar ball of \"%s\"\n", argv[1]);
/* creating tar of the module dependencies */
- deps = get_deps(NULL, argv[1]);
+ deps = get_deps(talloc_autofree_context(), argv[1]);
if (deps != NULL)
create_tar(deps, argv[1], argv[2]);
talloc_free(deps);