git-serv

All-in-one Git hosting container

git clone git://git.janzachar.dev/git-serv.git


0#!/bin/sh
1
2
3#shellcheck source=config/env
4. "/srv/config/env"
5
6usage() {
7	echo "usage: rm <name>"
8	echo "  removes a repo the given name"
9	echo "  example: rm test"
10	exit 1
11}
12
13[ $# -ne 1 ] && usage
14
15REPO="/repos/${1}.git"
16
17[ ! -d "$REPO" ] && {
18	echo "'${1}' does not exist!"
19	exit 1
20}
21
22rm -Rf "$REPO"
23
24SRC=/repos \
25BUILD=/srv/pages \
26	python3 /srv/spgit/src/main.py >> /log/spgit 2>> /log/spgit
27
28