#!/bin/bash # this script allows the creation of new repos over ssh on git server # USAGE: # ssh git@ new-repo # - follow the prompts $PROJECT_NAME = $1 if [[ -z "$1" ]]; then echo "project name cannot be empty" exit 1 fi if [[ $PROJECT_NAME!=*.git ]]; then PROJECT_NAME="${PROJECT_NAME}.git" fi git --bare init "${PROJECT_NAME}" echo "project created" #vim: filetype=bash