#!/bin/bash if [ "$2" == "" ]; then echo usage: mkgit-server [repository name] [git user] [-d] echo " -d; edit the description file instead" exit fi if [ "$3" == "-d" ]; then $EDITOR /home/$2/$1.git/description exit fi mkdir /home/$2/$1.git cd /home/$2/$1.git git init --bare echo "This is the description of the Repo" > description $EDITOR description chown -R $2 * cd .. chown -R $2 $1.git