aboutsummaryrefslogtreecommitdiffstats
path: root/roles/obsd_git/files/git-shell-commands
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-10-07 21:06:35 -0700
committerEugene Triguba <hello@eugenetriguba.com>2026-10-11 18:36:50 -0700
commitf60e2a723c744628823cad6344a8d3d0dd4c32e4 (patch)
tree02201b37edbe05070aac9c5f2c2335dbe25c22bc /roles/obsd_git/files/git-shell-commands
parentRetab file (diff)
downloadsite-configs-f60e2a723c744628823cad6344a8d3d0dd4c32e4.zip
Update configs
Diffstat (limited to 'roles/obsd_git/files/git-shell-commands')
-rw-r--r--roles/obsd_git/files/git-shell-commands/create27
1 files changed, 0 insertions, 27 deletions
diff --git a/roles/obsd_git/files/git-shell-commands/create b/roles/obsd_git/files/git-shell-commands/create
deleted file mode 100644
index db38900..0000000
--- a/roles/obsd_git/files/git-shell-commands/create
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-set -e
-
-main() {
- repo="$1"
- desc="$2"
- if [ -z "$repo" ]; then
- echo "Usage: provide a repository name" >&2
- exit 1
- fi
-
- repo_name=$(basename "$repo" .git)
- repo_path="/var/www/pub/git/$repo_name.git"
-
- if [ ! -d "$repo_path" ]; then
- echo "Creating bare repository: $repo_name.git"
- git init --bare --initial-branch=main "$repo_path"
- chown -R git:git "$repo_path"
-
- if [ -n "$desc" ]; then
- # cgit will lookup the git repository description via the git config.
- git -C "$repo_path" config gitweb.description "$desc"
- fi
- fi
-}
-
-main "$@"