#!/bin/sh

# For normal (not "wild") repos, gitolite v3 sets 'gitweb.description' instead
# of putting the text in the "description" file.  This is easier because it
# just goes with the flow of setting config variables; nothing special needs
# to be done for the description.

# But this only works for gitweb, not for cgit.  Cgit users must uncomment the
# 'cgit' line in the ENABLE list in the rc file (which has the effect of
# adding this program to the POST_COMPILE trigger list).

cd $GL_REPO_BASE
gitolite list-phy-repos | gitolite git-config % gitweb.description | perl -I"$GL_LIBDIR" -MGitolite::Easy -lne '
            my @F = split /\t/,$_,3;
            textfile( file => "description", repo => $F[0], text => $F[2] );
    '
