summaryrefslogtreecommitdiffstats
path: root/mkgit
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-03-24 15:21:05 +0100
committerRemi Collet <fedora@famillecollet.com>2017-03-24 15:21:05 +0100
commiteae244ef56a722f6114a2011efaa0b276b594222 (patch)
tree4709b6d2e79d09d93d5ad75afc54a7028fd36f90 /mkgit
parentef65bbc0b0df613208970c510f3198ef16e5c920 (diff)
add mkdir help
Diffstat (limited to 'mkgit')
-rwxr-xr-xmkgit21
1 files changed, 21 insertions, 0 deletions
diff --git a/mkgit b/mkgit
new file mode 100755
index 0000000..69d3dbe
--- /dev/null
+++ b/mkgit
@@ -0,0 +1,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
+