dockerfiles/gitserver/create_repo
Jess Frazelle d2bb8fbcf3
latest versions
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-04-27 17:06:24 -04:00

15 lines
185 B
Bash
Executable File

#!/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"
)