relpath, relpath);
fputs("</td><td><h1>", fp);
xmlencode(fp, strippedname, strlen(strippedname));
- fputs("</h1><span class=\"desc\">", fp);
+ fputs("</h1></td></tr><tr><td></td><td><span class=\"desc\">", fp);
xmlencode(fp, description, strlen(description));
fputs("</span></td></tr>", fp);
if (cloneurl[0]) {
if (license)
fprintf(fp, " | <a href=\"%sfile/%s.html\">LICENSE</a>",
relpath, license);
+ fprintf(fp, " | <a href=\"%s%s.tar.gz\">Download</a>",
+ relpath, strippedname);
fputs("</td></tr></table>\n<hr/>\n<div id=\"content\">\n", fp);
}
return lc;
}
- int
+int
writeblobhtml(const char *filename, FILE *fp, const git_blob *blob)
{
int lc = 0;
return lc;
}
- void
+void
printcommit(FILE *fp, struct commitinfo *ci)
{
fprintf(fp, "<b>commit</b> <a href=\"%scommit/%s.html\">%s</a>\n",
}
}
- void
+void
printshowfile(FILE *fp, struct commitinfo *ci)
{
const git_diff_delta *delta;
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 = "";
writefooter(fp);
fclose(fp);
+ cp("files.html", "index.html");
+
/* summary page with branches and tags */
fp = efopen("refs.html", "w");
writeheader(fp, "Refs");