Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: brian (git@myr.sh)
Date: Tue Dec 26 19:24:00 2023 -0300
Parent: 3d8d289
Style
diff --git a/post-receive b/post-receive
index 9514204..2bfa5a3 100755
--- a/post-receive
+++ b/post-receive
@@ -293,7 +293,10 @@ do
# check repo for go mod
tag="${ref#refs/tags/}"
- find "$OUT/raw/" -name go.mod && creategomod "$tag"
+ for mod in $(find "$OUT/raw/" -name go.mod)
+ do
+ creategomod "$tag"
+ done
;;
*) echo "$ref received. Doing nothing." ;;
esac
diff --git a/receive-dovel.email b/receive-dovel.email
index 4e74050..b1297f9 100755
--- a/receive-dovel.email
+++ b/receive-dovel.email
@@ -42,37 +42,37 @@ emails() {
# print each email
ls -1rt "$root/$repo/mail/$subj/"*.mbox | while read -r f
- do
- {
- # print headers
- read -r foo from date
- cat <<- EOF
- <details>
- <summary>
- From: $from<br>
- Date: $date
- </summary>
- <ul>
- EOF
-
- while read -r k v
- do
- case "$k" in
- "") break ;;
- *) printf "<li>$k $v</li>\n" ;;
- esac
- done
-
- # print body
- cat <<- EOF
- </ul>
- </details>
- <pre>
- EOF
- escapehtml
- printf "</pre>\n<br>\n"
- } < "$f"
- done
+ do
+ {
+ # print headers
+ read -r foo from date
+ cat <<- EOF
+ <details>
+ <summary>
+ From: $from<br>
+ Date: $date
+ </summary>
+ <ul>
+ EOF
+
+ while read -r k v
+ do
+ case "$k" in
+ "") break ;;
+ *) printf "<li>$k $v</li>\n" ;;
+ esac
+ done
+
+ # print body
+ cat <<- EOF
+ </ul>
+ </details>
+ <pre>
+ EOF
+ escapehtml
+ printf "</pre>\n<br>\n"
+ } < "$f"
+ done
# finish
cat <<- EOF