aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails/22_forge/files/git-shell-commands/delete
blob: 1c1ce0d58eabb6248ee7afaabbe7faced1d9ec95 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
if [ -z "$1" ]; then
    echo "Usage: delete [REPO_NAME]"
    exit 1
fi
if [ ! -d "$1.git" ]; then
    echo "Repository $1 does not exist"
    exit 1
fi
rm -rf "$1.git"
echo "Deleted repository $1"