aboutsummaryrefslogtreecommitdiff
path: root/post-receive
diff options
context:
space:
mode:
Diffstat (limited to 'post-receive')
-rw-r--r--post-receive5
1 files changed, 4 insertions, 1 deletions
diff --git a/post-receive b/post-receive
index 28db0c5..707bb96 100644
--- a/post-receive
+++ b/post-receive
@@ -23,7 +23,10 @@ sync_repo() {
}
# make sure the sync occurs in the background
-nohub bash -c " it push --mirror "$REPO_URL" >> "$LOGFILE" 2>&1" > /dev/nul 2>&1 &
+nohup bash -c "
+ cd \"$REPO_PATH\" || exit 1
+ git push --mirror \"$REPO_URL\" >> \"$LOGFILE\" 2>&1
+" > /dev/nul 2>&1 &
# vim: filetype=sh