summaryrefslogtreecommitdiff
path: root/git.liw.fi.sh
diff options
context:
space:
mode:
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
+}