From bd1fe745e1b8bd24d556e062cb1af270c11cd622 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Mon, 10 Oct 2016 14:42:05 -0400 Subject: 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. --- bin/dotfiles | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bin/dotfiles (limited to 'bin') 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() -- cgit v1.2.3