[sysadmin-bin: 42/168] Add a script to update hooks and config for all repositories
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin: 42/168] Add a script to update hooks and config for all repositories
- Date: Thu, 24 May 2012 19:54:58 +0000 (UTC)
commit 5794b934b21eefe940779d21f3a96683f7b524fd
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Mar 16 18:08:19 2009 -0400
Add a script to update hooks and config for all repositories
gnomify-repos: Enforce the right config and hooks for all GIT
repositories.
gnomify-repos | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gnomify-repos b/gnomify-repos
new file mode 100755
index 0000000..e5ccaeb
--- /dev/null
+++ b/gnomify-repos
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# Script to set up the right config variables and hooks for our
+# git repositories.
+
+gnomify_repo() {
+ export GIT_DIR=$1
+
+ git config hooks.emailprefix ""
+ git config hooks.mailinglist svn-commits-list gnome org
+
+ ln -sf /home/admin/gitadmin-bin/gnome-pre-receive $GIT_DIR/hooks/pre-receive
+ ln -sf /home/admin/gitadmin-bin/gnome-post-receive $GIT_DIR/hooks/post-receive
+}
+
+# We only enforce the above parameters for the standard repositories; the
+# ones owned by 'gnomecvs'. There are also some unusual repositories owned
+# by other groups that have different policies.
+for r in $(find /git -maxdepth 1 -group gnomecvs -print); do
+ if [ -d $r/objects ] ; then
+ gnomify_repo $r
+ fi
+done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]