Add DOUGAL_ROOT environment variable support.

When searching for configuration files, we look in the
following places:

1. $DOUGAL_ROOT/etc/
2. $HOME/software/etc/
3. ./software/etc/
This commit is contained in:
D. Berge
2020-08-09 11:22:46 +02:00
parent 36596da46b
commit ed6b051669

View File

@@ -11,7 +11,7 @@ surveys should be under $HOME/etc/surveys/*.yaml. In both cases,
$HOME is the home directory of the user running this script.
"""
prefix = os.environ.get("HOME", ".")
prefix = os.environ.get("DOUGAL_ROOT", os.environ.get("HOME", ".")+"/software")
def read (file = None):
if file is None: