diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 07:48:31 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 07:48:31 (JST) |
commit | ea2831f1c826d92c0158474c2d07837ec2f9fd6c (patch) | |
tree | e8d6a89bf0f50835f9c86dd642e7906e1d050df7 /cgit.c | |
parent | 6fb7d09fea94b3dd6932469283358cb24f1e7e29 (diff) | |
download | cgit-ea2831f1c826d92c0158474c2d07837ec2f9fd6c.zip cgit-ea2831f1c826d92c0158474c2d07837ec2f9fd6c.tar.gz |
Don't hardcode urls when SCRIPT_NAME is available
Also, let the makefile define the name of the installed cgi and
use that definition as a default value for cgit_script_name variable.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -244,6 +244,8 @@ int main(int argc, const char **argv) | |||
244 | cgit_repolist.repos = NULL; | 244 | cgit_repolist.repos = NULL; |
245 | 245 | ||
246 | cgit_read_config(CGIT_CONFIG, cgit_global_config_cb); | 246 | cgit_read_config(CGIT_CONFIG, cgit_global_config_cb); |
247 | if (getenv("SCRIPT_NAME")) | ||
248 | cgit_script_name = xstrdup(getenv("SCRIPT_NAME")); | ||
247 | if (getenv("QUERY_STRING")) | 249 | if (getenv("QUERY_STRING")) |
248 | cgit_querystring = xstrdup(getenv("QUERY_STRING")); | 250 | cgit_querystring = xstrdup(getenv("QUERY_STRING")); |
249 | cgit_parse_args(argc, argv); | 251 | cgit_parse_args(argc, argv); |