From 0cfcc7968f5d3983b8ad32e365a7e5d52b56eff9 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Mon, 5 Apr 2021 18:22:12 -0400 Subject: [PATCH] stagit: generate tar archive for each repo --- src/stagit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/stagit.c b/src/stagit.c index d1bf33c..cd18b03 100644 --- a/src/stagit.c +++ b/src/stagit.c @@ -387,6 +387,8 @@ writeheader(FILE *fp, const char *title) if (license) fprintf(fp, " | LICENSE", relpath, license); + fprintf(fp, " | Download", + relpath, strippedname); fputs("\n
\n
\n", fp); } @@ -1209,6 +1211,12 @@ main(int argc, char *argv[]) submodules = ".gitmodules"; git_object_free(obj); + /* Generate tarball */ + char tarball[255]; + sprintf(tarball, "tar -zcf %s.tar.gz --ignore-failed-read --exclude='.git' %s", + strippedname, repodir); + system(tarball); + /* log for HEAD */ fp = efopen("log.html", "w"); relpath = ""; -- 2.39.2