#!/usr/bin/env python3

# PYTHON_ARGCOMPLETE_OK

import os
import sys
# we know that our relative path doesn't include the module
try:
    # If __file__ is a symlink, resolve to where it points to. If the symlink
    # target is relative, then we need to join that to the directory __file__
    # is inside in order to resolve it correctly. If the symlink target is
    # absolute, then os.path.join is defined to ignore the first parameter
    # here.
    realpath = os.path.join(os.path.dirname(__file__), os.readlink(__file__))
except OSError:
    realpath = __file__
sys.path.insert(
    0,
    os.path.abspath(
        os.path.join(os.path.dirname(realpath), os.path.pardir)
    )
)

from gitubuntu.__main__ import main

if __name__ == '__main__':
    main()
