From 92a545dc6b64bbebfa9bc4c3788f1ae3db058788 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sun, 14 Oct 2012 18:03:27 -0700 Subject: Add checking for ROOT in the environment on statup, and setting it in the appropriate paths. Add warnings for not finding the config file and installed db. Fix updaters config file path --- bin/layman | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin/layman') diff --git a/bin/layman b/bin/layman index 6299d34..ba91c20 100755 --- a/bin/layman +++ b/bin/layman @@ -18,6 +18,8 @@ __version__ = "0.2" +import os + #=============================================================================== # # Dependencies @@ -33,5 +35,11 @@ from layman.cli import Main # #------------------------------------------------------------------------------- -main = Main(ArgsParser()) +root = None +try: + root = os.environ['ROOT'] +except KeyError: + pass + +main = Main(ArgsParser(root=root)) main() -- cgit v1.2.3-1-g7c22