summaryrefslogtreecommitdiff
path: root/git.liw.fi.sh
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-10-08 19:48:59 +0100
committerLars Wirzenius <liw@liw.fi>2013-10-08 19:48:59 +0100
commit1e69db8e6e7f17c1278e170bd1410e9fb18210eb (patch)
tree2e7c60d47852b1c5fc13fe9fd462c717451b72ff /git.liw.fi.sh
parent27a4934b62881279618785b49e97e9730c35c67d (diff)
downloadliw-gitano-acl-test-suite-1e69db8e6e7f17c1278e170bd1410e9fb18210eb.tar.gz
Verify that cgit shows public repos
Diffstat (limited to 'git.liw.fi.sh')
-rw-r--r--git.liw.fi.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/git.liw.fi.sh b/git.liw.fi.sh
index 9f03ff3..6f20266 100644
--- a/git.liw.fi.sh
+++ b/git.liw.fi.sh
@@ -124,3 +124,24 @@ destroy_repo()
{
two_step run_gitano_as "$1" destroy "$2"
}
+
+
+# Does cgit show a repository?
+
+cgit_shows()
+{
+ local tempfile="$(mktemp)"
+ wget -q -O- "http://$GITHOST/cgi-bin/cgit/cgit.cgi/$1/" \
+ > "$tempfile" 2>&1
+ if grep 'Repository seems to be empty' "$tempfile"
+ then
+ ret=0
+ elif grep 'Commit message' "$tempfile"
+ then
+ ret=0
+ else
+ ret=1
+ fi
+ rm -f "$tempfile"
+ return $ret
+}