[sysadmin-bin: 99/168] Add a script to extract DOAP information from all modules



commit fd1a97d63574d45236c710a450dea3b750d06287
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Fri Apr 24 19:04:20 2009 -0400

    Add a script to extract DOAP information from all modules
    
    update-all-info: run over /git and extract the description/group
      and raw gnome_doap from all modules.

 update-all-info |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/update-all-info b/update-all-info
new file mode 100755
index 0000000..c801ff6
--- /dev/null
+++ b/update-all-info
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# This script should be run with the output written to /git/cgit.repositories, which
+# is included from /etc/cgitrc
+
+BINDIR=/home/admin/gitadmin-bin
+
+function process_repos() {
+    paths=$1
+    for p in $paths; do
+	for r in $(echo $p/*); do
+	    if test -d $r/objects; then
+		absdir=$(cd $r && pwd)
+		projectshort=$(basename ${absdir%.git})
+
+		export GIT_DIR=$r
+		if git cat-file -e master:$projectshort.doap 2>/dev/null ; then
+		    git cat-file blob master:$projectshort.doap | $BINDIR/extract-doap-info $r
+		elif git cat-file -e master:MAINTAINERS 2>/dev/null ; then
+		    git cat-file blob master:MAINTAINERS | $BINDIR/doap-from-maintainers > $r/gnome_doap
+		fi
+	    fi
+	done
+    done
+}
+
+process_repos "/git"
+$BINDIR/update-cgit



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]