aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@jbernard.io> 2016-10-10 14:42:05 -0400
committerGravatar Jon Bernard <jbernard@jbernard.io> 2016-10-11 10:39:55 -0400
commitbd1fe745e1b8bd24d556e062cb1af270c11cd622 (patch)
tree40b759fd31677a6a7656915cb42f77377bdc7a64 /bin
parent2314cbd0f20caa2321a83719f48f7b07f0814cff (diff)
downloaddotfiles-bd1fe745e1b8bd24d556e062cb1af270c11cd622.tar.gz
dotfiles-bd1fe745e1b8bd24d556e062cb1af270c11cd622.tar.bz2
dotfiles-bd1fe745e1b8bd24d556e062cb1af270c11cd622.zip
Add dependencies as submodules
This gives you the choice to run dotfiles directly from the repository without a virtual environment. These are only useful from the git repository and not included in the pypi releases.
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()