summaryrefslogtreecommitdiff
path: root/roles/gitserver/files
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2015-08-29 19:30:38 +0200
committerChristian Franke <nobody@nowhere.ws>2015-08-29 19:30:38 +0200
commitdd37acbfbd5a0c8db622a9ffae7c81e96b6b036a (patch)
tree8ff614f4a899a2a65277ff104b13024f1418c434 /roles/gitserver/files
parent40354757db45bc519282f410976b20cfc463f184 (diff)
Add role to setup gitolite
Diffstat (limited to 'roles/gitserver/files')
-rw-r--r--roles/gitserver/files/gitolite.rc21
-rw-r--r--roles/gitserver/files/restore-backup.sh14
2 files changed, 35 insertions, 0 deletions
diff --git a/roles/gitserver/files/gitolite.rc b/roles/gitserver/files/gitolite.rc
new file mode 100644
index 0000000..6b65a8b
--- /dev/null
+++ b/roles/gitserver/files/gitolite.rc
@@ -0,0 +1,21 @@
+%RC = (
+ UMASK => 0022,
+ GIT_CONFIG_KEYS => '',
+ LOG_EXTRA => 1,
+ ROLES => {
+ READERS => 1,
+ WRITERS => 1,
+ },
+ ENABLE => [
+ 'help',
+ 'desc',
+ 'info',
+ 'perms',
+ 'writable',
+ 'ssh-authkeys',
+ 'git-config',
+ 'daemon',
+ 'cgit',
+ ],
+);
+1;
diff --git a/roles/gitserver/files/restore-backup.sh b/roles/gitserver/files/restore-backup.sh
new file mode 100644
index 0000000..8fc0de5
--- /dev/null
+++ b/roles/gitserver/files/restore-backup.sh
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+cd old-repositories
+for repo in *.git; do
+ if [ x"$repo" = x"gitolite-admin.git" ]; then
+ continue;
+ fi
+
+ cd $repo
+ if [ $(git branch | wc -l) -ne 0 ]; then
+ gitolite push --mirror "../../repositories/$repo"
+ fi
+ cd ..
+done