From 43513aa1c835c789af1bc53acd61c2474be93608 Mon Sep 17 00:00:00 2001 From: zPlus Date: Sun, 26 Feb 2023 23:46:13 +0100 Subject: [PATCH] Add support for paths via environment variables. Allow paths to be specified as environment variables. If the variables do not exist, a default value would be assumed. --- web.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web.py b/web.py index 823b44e..b143408 100644 --- a/web.py +++ b/web.py @@ -31,11 +31,11 @@ from pygments.formatters import HtmlFormatter # The root folder where Gitolite stores the repositories. This is used to find the # actual repositories. -GITOLITE_REPOSITORIES_ROOT = '/home/git/repositories' +GITOLITE_REPOSITORIES_ROOT = os.environ.get(GITOLITE_REPOSITORIES_ROOT, '/home/git/repositories') # These are only used when anonymous cloning over HTTPS -GITOLITE_SHELL = '/home/git/bin/gitolite-shell' -GITOLITE_HTTP_HOME = '/home/git' +GITOLITE_SHELL = os.environ.get(GITOLITE_SHELL, '/home/git/bin/gitolite-shell') +GITOLITE_HTTP_HOME = os.environ.get(GITOLITE_HTTP_HOME, '/home/git') # The domain of this instance. This is only really used when displaying list addresses, # or when the domain needs to be displayed on some pages.