summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcs-server/usr-src-infra-scripts/generate-project-list-html.sh76
-rw-r--r--vcs-server/var-www-webgit/index.html31
2 files changed, 107 insertions, 0 deletions
diff --git a/vcs-server/usr-src-infra-scripts/generate-project-list-html.sh b/vcs-server/usr-src-infra-scripts/generate-project-list-html.sh
new file mode 100644
index 0000000..819e224
--- /dev/null
+++ b/vcs-server/usr-src-infra-scripts/generate-project-list-html.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+set -e
+
+##
+## Generate a static HTML file with a list of WebGit repositories,
+## and links to the GitWeb,CGIT,direct viewers.
+##
+
+# For saner sort,join
+LC_ALL=C
+
+# File containing the project list.
+# This file is referenced from /etc/cgitrc-webgit and /etc/gitweb-webgit.conf
+PROJECT_LIST_FILE=project-list.html
+
+# Directory containing the repositories
+WEBGIT_ROOT=/srv/git/web
+
+cd "$WEBGIT_ROOT" || exit 1
+
+##
+## HTML Header
+##
+echo "
+<html>
+<head>
+<title>GNU Savannah WebGit Repositories</title>
+<style>
+table.list td {
+ padding-left: 2em;
+}
+</style>
+</head>
+<body>
+<h1>Experimental WebGit Repositories list</h1>
+The following repositories are available:
+<br/>
+<br/>
+" > t
+
+##
+## Generate content links to each letter
+##
+awk 'BEGIN { for (a=65;a<=90;a=a+1) { printf "<a href=\"#%c\">%c</a> ",a,a } }' >> t
+
+## Table header
+echo "<br/>
+<table class=\"list\">" >> t
+
+# Generate list of all projects
+find "$WEBGIT_ROOT" -maxdepth 1 -type d -name "*.git" -printf "%f\n" \
+ | sort \
+ | awk 'BEGIN { letter = "" }
+ letter != substr($0,1,1) {
+ letter = substr($0,1,1)
+ printf "<tr><td><a name=\"%s\">&nbsp;</a></td></tr>",letter
+ }
+ 1 { print "<tr>"
+ printf "<td>%s</td>\n",$0
+ printf "<td><a href=\"/cgit/%s/\">cgit</a></td>\n",$0
+ printf "<td><a href=\"/gitweb/?p=%s\">gitweb</a></td>\n", $0
+ printf "<td><a href=\"/r/%s/\">direct</a></td>\n", $0
+ print "</td>"
+ }' >> t
+
+##
+## HTML footer
+##
+echo "
+</table>
+</body>
+</html>" >> t
+
+mv t "$PROJECT_LIST_FILE"
+
diff --git a/vcs-server/var-www-webgit/index.html b/vcs-server/var-www-webgit/index.html
new file mode 100644
index 0000000..5e48c60
--- /dev/null
+++ b/vcs-server/var-www-webgit/index.html
@@ -0,0 +1,31 @@
+<html>
+<head><title>Savannah Web/Git repositories</title></head>
+<body>
+<h1>EXPERIMENTAL</h1>
+
+<p>
+This server hosts the web-pages repositories in GIT (converted from CVS).
+</p>
+
+<p>
+These repositories <b>are not</b> used to generate the webpages at
+http://www.gnu.org/ or http://www.nongnu.org .
+</p>
+
+<p>
+For more information, please write to <a href="mailto:savannah-hackers-public@gnu.org">savannah-hackers-public@gnu.org</a>.
+</p>
+
+<br/>
+
+This servers hosts the Git repositories (as well as a web interface to browse them.)<br />
+Check <a href="http://savannah.gnu.org/">savannah.gnu.org</a> for more information.
+
+<br/>
+<br/>
+
+See <a href="/project-list/">list of available repositories</a>.
+
+</body>
+</html>
+