list

scripts

Repo containing scripts to be used with dovel, and git hooks that powers our web interface.

curl https://dovel.email/scripts.tar tar

5d7cbd0

Author: blmayer (bleemayer@gmail.com)

Date: Wed Oct 4 16:14:29 2023 -0300

Parent: 124b9d1

Added mail init function

Diff

post-receive

diff --git a/post-receive b/post-receive
index ffb86f6..1707a7d 100755
--- a/post-receive
+++ b/post-receive
@@ -238,6 +238,21 @@ updatetree() {
 	EOF
 }
 
+initmail() {
+	[ -f "$OUT/mail.html ] && return
+	echo "creating mail.html"
+	cat <<- EOF > "$OUT/mail.html"
+		$(pagehead "$REPO")
+		$(pagesummary "$REPO")
+		<hr>
+		<h2>mail</h2>
+		No mail here. To create a thread send an email to
+		<a href="mailto:$REPO@dovel.email">$REPO@dovel.email</a>.
+		</body>
+		</html>
+	EOF
+}
+
 # first argument should be the version, e.g. v0.1.0
 creategomod() {
 	TMP="$(mktemp -d)"
@@ -264,6 +279,7 @@ do
 		updaterefs
 		updatetree "$newrev"
 		updatelog
+		initmail
 		;;
 	"refs/tags/v"*)
 		echo "received version tag $ref"