2022-04-02 09:45:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
repo_name="$1"
|
|
|
|
|
|
|
|
if [[ $repo_name =~ ^.*/$ ]] ; then
|
|
|
|
echo "Failed to create new repository."
|
|
|
|
echo "Don't place a slash after repository's name"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! $repo_name =~ ^.*\.git$ ]] ; then
|
|
|
|
repo_name="${repo_name}.git"
|
|
|
|
fi
|
|
|
|
|
2022-04-02 10:50:34 +00:00
|
|
|
git init --bare --template=git-templates ${repo_name} 1>/dev/null
|