summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2011-04-22 19:25:55 -0400
committerGravatar Jon Bernard <jbernard@tuxion.com> 2011-04-22 19:25:55 -0400
commitdd64afd0e3f4ee362471d5e77296eb9109f9e9d6 (patch)
treea31640f4610bcf4af6978c91cd2cbe81928dac57 /bin
downloaddotfiles-9dba6bf2c9a7e5233622e9b009dfd6eb88879cdc.tar.gz
dotfiles-9dba6bf2c9a7e5233622e9b009dfd6eb88879cdc.tar.bz2
dotfiles-9dba6bf2c9a7e5233622e9b009dfd6eb88879cdc.zip
Initial commitv0.1.0
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dotfiles19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/dotfiles b/bin/dotfiles
new file mode 100755
index 0000000..1cd5264
--- /dev/null
+++ b/bin/dotfiles
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+
+# Add project root directory (enable symlink, and trunk execution).
+PROJECT_ROOT_DIRECTORY = os.path.abspath(
+ os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0]))))
+
+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)
+ os.putenv('PYTHONPATH', PROJECT_ROOT_DIRECTORY)
+
+import dotfiles
+
+if __name__ == '__main__':
+ dotfiles.cli.main()