Add a wrapper for using the tool without installation via setuptools
authorAlexander Popov <alex.popov@linux.com>
Thu, 26 Mar 2020 12:45:24 +0000 (15:45 +0300)
committerAlexander Popov <alex.popov@linux.com>
Thu, 26 Mar 2020 12:45:24 +0000 (15:45 +0300)
bin/kconfig-hardened-check [new file with mode: 0755]

diff --git a/bin/kconfig-hardened-check b/bin/kconfig-hardened-check
new file mode 100755 (executable)
index 0000000..beab71d
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/python3
+
+# For using the tool without installation via setuptools
+
+import os
+import sys
+import inspect
+
+current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
+parent_dir = os.path.dirname(current_dir)
+sys.path.insert(0, parent_dir)
+
+import kconfig_hardened_check
+
+if __name__ == "__main__":
+    kconfig_hardened_check.main()