aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dotfiles21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/dotfiles b/bin/dotfiles
new file mode 100755
index 0000000..f2e5147
--- /dev/null
+++ b/bin/dotfiles
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+import os
+import sys
+
+
+PROJECT_ROOT_DIRECTORY = os.path.abspath(
+ os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0]))))
+PROJECT_VENDOR_DIRECTORY = os.path.join(PROJECT_ROOT_DIRECTORY, 'vendor')
+
+if (os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'dotfiles'))
+ and PROJECT_ROOT_DIRECTORY not in sys.path):
+ sys.path.insert(0, PROJECT_ROOT_DIRECTORY)
+
+for vendor in os.listdir(PROJECT_VENDOR_DIRECTORY):
+ vendor = os.path.join(PROJECT_VENDOR_DIRECTORY, vendor)
+ sys.path.insert(0, vendor)
+
+if __name__ == '__main__':
+ from dotfiles.cli import cli
+ cli()