aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails/22_forge/files/git-shell-commands/new
blob: ba67bc45d90389ad924b19fd96960dd1cc7d27d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
if [ -z "$1" ]; then
    echo "Usage: new [REPO_NAME]"
    exit 1
fi
if [ -d "$1.git" ]; then
    echo "Repository $1 already exists"
    exit 1
fi
git init --bare "$1.git"
echo "$1" > "$1.git/description"
echo "Created repository $1"