#!/usr/bin/env python
################################################################################
# LAYMAN - A UTILITY TO SELECT AND UPDATE GENTOO OVERLAYS
################################################################################
# Distributed under the terms of the GNU General Public License v2
#
# Copyright:
#             (c) 2005 Gunnar Wrobel
#             (c) 2009 Sebastian Pipping
#             (c) 2011 Brian Dolbec
#             Distributed under the terms of the GNU General Public License v2
#
# Author(s):
#             Gunnar Wrobel <wrobel@gentoo.org>
#             Sebastian Pipping <sebastian@pipping.org>
#             Brian Dolbec <brian.dolbec@gmail.com>
#

__version__ = "0.2"

import os

# Used for running live development code only
#import sys
#print(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
#sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.abspath(__file__))))


#===============================================================================
#
# Dependencies
#
#-------------------------------------------------------------------------------

from   layman.argsparser     import ArgsParser
from   layman.cli            import Main

#===============================================================================
#
# MAIN
#
#-------------------------------------------------------------------------------

root = None
try:
    root = os.environ['ROOT']
except KeyError:
    pass

main = Main(ArgsParser(root=root))
try:
    main()
except KeyboardInterrupt:
    print('Interrupt received, exiting...')
