Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Add a helper for configs of several repositories
The configs a run of t0101 writes are byte for byte what they were. The
scan configs name no repository and descrc adds one to a copy of the
shared config, so those keep their own form.
Diffstat (limited to 'tests/setup.sh')
| -rw-r--r-- | tests/setup.sh | 10 |
1 file changed, 10 insertions, 0 deletions
diff --git a/tests/setup.sh b/tests/setup.sh index 26a3f67..ac6e293 100644 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -293,6 +293,16 @@ cgitrc_repo() { "repo.url=$cgitrc_url$LF" "$cgitrc_path$LF" "$cgitrc_after" >"$cgitrc_file" } +# Writes a config to the file named first with the cache off and links rooted +# at /, as cgitrc_repo does, followed by the rest as lines of their own. They +# keep the order given, since a repo.* setting goes to the repository named +# last and a section takes in the repositories after it. +cgitrc_repos() { + cgitrc_file=$1 + shift + printf '%s\n' virtual-root=/ cache-size=0 "$@" >"$cgitrc_file" +} + # Writes the global settings named after the file ahead of a copy of the # shared cgitrc. The copy turns the cache off, because a page is cached under # its request alone and would otherwise come back as the shared config made |
