]> gitweb.ps.run Git - ps-cgit/commit
Add support for environment variable expansion
authorLars Hjemli <hjemli@gmail.com>
Sun, 21 Mar 2010 23:09:43 +0000 (00:09 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sun, 21 Mar 2010 23:09:43 +0000 (00:09 +0100)
commitba56a37e863d0f90e3e953047486905cfb959925
tree965e2c917f472264de35125eec35c361984eba4f
parentff3a3b4e2b7463bb8cb370bdda393e8b3526fcb9
Add support for environment variable expansion

This patch teaches cgit to expand environment variables in certain
cgitrc option values (cache_root, scan-path, include) plus when
finding the location of cgitrc itself.

One use case for this feature is virtual hosting - e.g. by setting
$CGIT_CONFIG='/etc/cgitrc/$HTTP_HOST' in httpd.conf, all virtual
hosts automatically gets their own cgitrc.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit.c
cgit.h
shared.c