[sysadmin-bin: 50/168] Mark newly created repositories as [PENDING] in cgit.



commit 744ea1cc82f0d21030be6df164aff6e9978d1d89
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Mar 19 16:43:30 2009 -0400

    Mark newly created repositories as [PENDING] in cgit.
    
    If $GIT_DIR/pending exists, then show [PENDING] in the cgit description.

 find-cgit-repos.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/find-cgit-repos.sh b/find-cgit-repos.sh
index 7146c24..543721f 100755
--- a/find-cgit-repos.sh
+++ b/find-cgit-repos.sh
@@ -14,10 +14,15 @@ function list_repos() {
 		shortname=${shortname%%.git}
 		shortname=${shortname/\/home\//\~}
 		url=${shortname}
+		if test -f $r/pending ; then
+		    pending="[PENDING] "
+		else
+		    pending=""
+		fi
 		test -z "$group" || echo repo.group=$group
 		echo repo.url=$url
 		echo repo.name=$shortname
-		echo repo.desc=$(test -f $r/description && cat $r/description)
+		echo repo.desc=$pending$(test -f $r/description && cat $r/description)
 		echo repo.path=$r
 		echo
 	    fi



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