From de84ffa2e5648c50135f2ba8be2b7267bb6b7bbf Mon Sep 17 00:00:00 2001 From: Teemu Ikonen Date: Thu, 30 Mar 2023 15:31:19 +0300 Subject: [PATCH] Add hand-crafted entry point scripts under ./bin --- bin/cellid-ols-import | 15 +++++++++++++++ bin/ols | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 bin/cellid-ols-import create mode 100755 bin/ols diff --git a/bin/cellid-ols-import b/bin/cellid-ols-import new file mode 100755 index 0000000..823a440 --- /dev/null +++ b/bin/cellid-ols-import @@ -0,0 +1,15 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +# Entry point script for running ols inside the source tree +import re +import sys +from pathlib import Path + +# Run from local source dir +sys.path.insert(0, str(Path(sys.argv[0]).resolve().parent.parent)) + +from ols.resolver.cellid.cellid_import import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/bin/ols b/bin/ols new file mode 100755 index 0000000..ddf8ea1 --- /dev/null +++ b/bin/ols @@ -0,0 +1,15 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +# Entry point script for running ols inside the source tree +import re +import sys +from pathlib import Path + +# Run from local source dir +sys.path.insert(0, str(Path(sys.argv[0]).resolve().parent.parent)) + +from ols.server import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main())