dockerfiles/gitserver/create_repo

15 lines
185 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
set -e
set -o pipefail
repo=$1
if [[ "$repo" != *.git ]]; then
repo="${repo}.git"
fi
echo "Creating $repo"
(
cd "$HOME"
git init --bare "$repo"
chown -R git:git "$repo"
)