blob: 54aff26d6b5f1ff9f0ef8fccc08563676c4816d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env bash
# git-shell-commands(5) subcommand: make a repo public (browsable in cgit
# and cloneable over HTTP) by creating the git-daemon-export-ok marker.
# Run: ssh git@git.kumardamani.net publish <name>
name="${1:-}"
case "$name" in
""|*[!a-zA-Z0-9._-]*|*..*)
echo "usage: publish <name>" >&2
exit 1
;;
esac
repo="/srv/git/$name.git"
if [ ! -d "$repo" ]; then
echo "error: no such repo '$name'" >&2
exit 1
fi
touch "$repo/git-daemon-export-ok"
echo "published: https://git.kumardamani.net/$name"
|