mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:37:07 +00:00
Add vars() method to configuration.py.
Returns some shell variables that are used by various deferred import processes.
This commit is contained in:
@@ -13,6 +13,17 @@ $HOME is the home directory of the user running this script.
|
|||||||
|
|
||||||
prefix = os.environ.get("DOUGAL_ROOT", os.environ.get("HOME", ".")+"/software")
|
prefix = os.environ.get("DOUGAL_ROOT", os.environ.get("HOME", ".")+"/software")
|
||||||
|
|
||||||
|
DOUGAL_ROOT = os.environ.get("DOUGAL_ROOT", os.environ.get("HOME", ".")+"/software")
|
||||||
|
VARDIR = os.environ.get("VARDIR", DOUGAL_ROOT+"/var")
|
||||||
|
LOCKFILE = os.environ.get("LOCKFILE", VARDIR+"/runner.lock")
|
||||||
|
|
||||||
|
def vars ():
|
||||||
|
return {
|
||||||
|
"DOUGAL_ROOT": DOUGAL_ROOT,
|
||||||
|
"VARDIR": VARDIR,
|
||||||
|
"LOCKFILE": LOCKFILE
|
||||||
|
}
|
||||||
|
|
||||||
def read (file = None):
|
def read (file = None):
|
||||||
if file is None:
|
if file is None:
|
||||||
file = prefix+"/etc/config.yaml"
|
file = prefix+"/etc/config.yaml"
|
||||||
|
|||||||
Reference in New Issue
Block a user