aboutsummaryrefslogtreecommitdiff
path: root/post-recieve
diff options
context:
space:
mode:
authorTrey Bastian <hello@treybastian.com>2025-10-28 10:01:00 +0000
committerTrey Bastian <hello@treybastian.com>2025-10-28 10:01:00 +0000
commita14c2500448022d22465bd9a18df0a10fb5f7339 (patch)
treeba4b2eab18e7698121a9d6eabf8929c3248640eb /post-recieve
parent6990b3363a11931a44ca07341ecbe3b7b495cc9e (diff)
typo
Diffstat (limited to 'post-recieve')
-rw-r--r--post-recieve28
1 files changed, 0 insertions, 28 deletions
diff --git a/post-recieve b/post-recieve
deleted file mode 100644
index ce604a0..0000000
--- a/post-recieve
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-# this post-recieve hook runs globally on my local git machine
-# it checks for the precense of a knot.conf file
-# if the file exists it reads it to get the remote repo and mirror pushes
-
-
-REPO_PATH=$(pwd)
-KNOT_FILE="$REPO_PATH/knot.conf"
-LOGFILE="/var/log/knot-sync.log" #log our syncing isssues
-
-if [ ! -f "$KNOT_FILE" ]; then
- echo "[$(date)] $REPO_PATH: knot.conf not found, skipping", >> "$LOGFILE"
- exit 0
-fi
-REPO_URL=$(cat "$KNOT_FILE" | tr -d '\n' | xargs)
-if [ -z "$REPO_URL" ]; then
- echo "[$(date)] $REPO_PATH: misconfigured knot.conf, skipping", >> "$LOGFILE"
- exit 0
-fi
-
-sync_repo() {
- git push --mirror "$REPO_URL" >> "$LOGFILE" 2>&1
-}
-
-# make sure the sync occurs in the background
-nohup bash -c "sync_repo" > /dev/null 2>&1 &
-# vim: filetype=sh