#!/bin/bash

while [ -z "$1" ]
do
	printf 'Repository: '
	read
	set "$REPLY"
done

set "${1##/}"

root_dir="${1%%/*}"
repo_dir="${1#*/}"

cd "$root_dir"
if git init --bare "$repo_dir"
then
	echo -e "\nClone repo with:\n\tgit clone git@syndamia.com:$1"
	echo -e "\nUpload local repo with:\n\tgit push git@syndamia.com:$1 '*:*'"
fi
