summaryrefslogtreecommitdiff
path: root/git-shell-commands
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-09-05 12:57:50 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-09-05 12:57:50 -0300
commit34feece7f514207ac129da60d90d2175d5a7951e (patch)
treee53cfb456da6545b565abf35e675bcfc7c2167ab /git-shell-commands
parent702f37e055d15028c97195303d60dd209b13a60a (diff)
Mirror a remote repo
Diffstat (limited to 'git-shell-commands')
-rwxr-xr-xgit-shell-commands/mirror11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-shell-commands/mirror b/git-shell-commands/mirror
new file mode 100755
index 0000000..2bf9a49
--- /dev/null
+++ b/git-shell-commands/mirror
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Mirrors a repository
+# ssh git@host mirror git://url/repo.git
+
+set -E
+
+repo="`basename "$1"`.git"
+
+git clone --mirror $1 $repo
+
+exit $?