#! /usr/bin/env python3
#  -*- coding: utf-8 -*-
#
# This file is part of npbackup, and is really just a binary shortcut to launch npbackup.__main__

import os
import sys

sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

import npbackup.__env__
npbackup.__env__.BUILD_TYPE = "cli"
from npbackup.__main__ import main
del sys.path[0]
if __name__ == "__main__":
    while "--run-as-cli" in sys.argv:
        # Drop --run-as-cli argument since cli doesn't know about it
        sys.argv.pop(sys.argv.index("--run-as-cli")) 
    main()
