commit c82f63b72e522d9ca82c31405d3e28436be5fa7c parent 3e2e2271e18a07bd70d24817b80db728d99bb272 Author: Tyler Clark <tyler.clark@foxide.xyz> Date: Sun, 9 Feb 2025 21:47:07 -0500 Automatically creating post-receive script in repo Diffstat:
A | new-repo.sh | | | 18 | ++++++++++++++++++ |
1 file changed, 18 insertions(+), 0 deletions(-)
diff --git a/new-repo.sh b/new-repo.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# This shell script creates a new git repo to make things easier. + +echo "What is the name of the new repository?" +read NAME +mkdir /usr/local/www/git/${NAME} +cd /usr/local/www/git/${NAME} +git init --bare +mv ./hooks/post-update.sample ./hooks/post-update +echo "exec /home/git/run.sh" > ./hooks/post-update +vim description + +# Reload git so repo is available +# The below are no longer necessary as there is a git_daemon service now +#killall git-daemon +#git daemon --reuseaddr --base-path=/usr/local/www/git --export-all --enable=receive-pack /usr/local/www/git/* & +echo "Restart the git_daemon service"