summaryrefslogtreecommitdiffstats
path: root/mkgit
blob: 69d3dbe8ffd138f21cbf6cdc573ee4903c212f6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

if [ -z "$1" ]; then
	echo "Usage  $0  remote_path"
	echo "Ex:    $0  rpms/php/foo/php-foo-bar"
	exit 1
fi

GIT=${1%/}
LOC=$(basename $GIT)

if [ -d $LOC ]; then
	echo "** $LOC already exists"
	exit 1
fi

ssh git@git.remirepo.net mkdir -p site/${GIT}.git \; cd site/${GIT}.git \; git init --bare
ssh git@git.remirepo.net ./mkrepos.sh 

git clone git@git.remirepo.net:site/${GIT}.git