#!/bin/bash if [ "$#" -ne 1 ]; then echo "Usage: create " exit 1 fi REPO_PATH="/srv/git/$1" mkdir -p "$REPO_PATH" cd "$REPO_PATH" && git init --bare echo "New bare git repo created at $REPO_PATH"