blob: f6b2dc8705e87a4ab15a2c2a83fd827f96b4330f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
# this script allows the creation of new repos over ssh on git server
# USAGE:
# ssh git@<host> new-repo <project name>
# - 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
|