add_repo.sh (296B)
1 #!/usr/bin/env sh 2 3 set -e 4 5 REPO=$1 6 7 if [ -z $REPO ] 8 then 9 echo "You should specify repository name" 10 exit 1 11 fi 12 13 mkdir -p /git/$REPO 14 cd /git/$REPO 15 git init --bare 16 17 echo "Anton Konyahin" > owner 18 echo "git://git.konyahin.xyz/$REPO" > url 19 ${EDITOR:-vi} description 20 21 chown -R git:git /git/$REPO