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

929aab9

Author: brian (git@myr.sh)

Date: Tue Sep 19 15:56:06 2023 -0300

Parent: 46e6f6c

Updating html also on scripts

Diff

diff --git a/post-receive b/post-receive
index 664ce5a..73b8791 100755
--- a/post-receive
+++ b/post-receive
@@ -3,8 +3,8 @@
#for debugging
#set -ex

-OUT="~/www/dovel.email/"
-GITDIR="~/git/dovel.email/"
+OUT="~/www/dovel.email"
+GITDIR="~/git/dovel.email"

# git.html lists all repos
cat << EOF
@@ -49,7 +49,7 @@ do
{
cat <<- EOF
<dt>$dir</dt>
-		<dd>"$(cat "$dir/.git/description")</dd>
+		<dd>"$(cat "$dir/description")</dd>
<dd>Last commit
EOF
git --git-dir "$dir/.git/" log -n 1 --format="%h at %ah"
@@ -64,14 +64,14 @@ cat << EOF
EOF

# create commit pages
-while read oldrev newrev ref
-do
-        # only checking out the master (or whatever branch you would like to deploy)
-        if [ "$ref" = "refs/heads/$BRANCH" ]
-        then
-                #git --work-tree="/home/blmayer/www/myr.sh" --git-dir="${GIT_DIR}" checkout -f ${BRANCH}
-        else
-                echo "Ref $ref received. Doing nothing: only the ${BRANCH} branch may be deployed on this server."
-        fi
-done
+# while read oldrev newrev ref
+# do
+#         # only checking out the master (or whatever branch you would like to deploy)
+#         if [ "$ref" = "refs/heads/$BRANCH" ]
+#         then
+#                 #git --work-tree="/home/blmayer/www/myr.sh" --git-dir="${GIT_DIR}" checkout -f ${BRANCH}
+#         else
+#                 echo "Ref $ref received. Doing nothing: only the ${BRANCH} branch may be deployed on this server."
+#         fi
+# done

diff --git a/post-receive-scripts b/post-receive-scripts
index 44f7fc0..aa5a0d7 100755
--- a/post-receive-scripts
+++ b/post-receive-scripts
@@ -18,6 +18,7 @@ do
TMP="$(mktemp -d)"
git --work-tree="$TMP" checkout -f ${BRANCH}
cp "$TMP/post-receive-scripts" "./hooks/post-receive"
+		cp "$TMP/post-receive" "./hooks/update-html"
cp "$TMP/post-receive" "../web/hooks/post-receive"
cp "$TMP/post-receive" "../server/hooks/post-receive"
else
@@ -26,3 +27,5 @@ do
done

rm -fr "$TMP"
+
+./hooks/update-html