9eae3ed258
Signed-off-by: Billy Brawner <billy@wbrawner.com>
18 lines
331 B
Bash
Executable file
18 lines
331 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
source "$(dirname "$0")/pre-script"
|
|
|
|
if [[ -z "$1" ]]; then
|
|
echo "Please enter a repository name"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -d "$1.git" ]]; then
|
|
echo "Repo $1 already exists"
|
|
exit 1
|
|
fi
|
|
|
|
/usr/bin/git init --bare "$1.git"
|
|
/usr/bin/git -C "$1.git" config http.receivepack true
|
|
echo "Successfully created repository $1"
|
|
|