Add support for "readme" option

The value of this option is used as the default value for repo.readme.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
Lars Hjemli 2010-08-21 15:08:01 +02:00
parent 6d7552bc07
commit 515edb0da3
6 changed files with 43 additions and 24 deletions

View file

@ -110,9 +110,11 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn)
if (!stat(p, &st))
readfile(p, &repo->desc, &size);
p = fmt("%s/README.html", path);
if (!stat(p, &st))
repo->readme = "README.html";
if (!repo->readme) {
p = fmt("%s/README.html", path);
if (!stat(p, &st))
repo->readme = "README.html";
}
p = fmt("%s/cgitrc", path);
if (!stat(p, &st)) {