1 2 3 4 5 6 7
#!/bin/bash REPO_DIR="/git-server/repos/$1" if [ ! -d "$REPO_DIR" ]; then mkdir -p "$REPO_DIR" cd "$REPO_DIR" git init --bare fi