aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2011-08-28 08:37:40 -0400
committerGravatar Jon Bernard <jbernard@tuxion.com> 2011-08-28 08:37:40 -0400
commit92f6cd0b0a283d2a949e83838c48e2e8cece1156 (patch)
treef697bec6a1c5c34e1701de2880e0d48ec7c13000
parent817994ba5583d1e6c6af2ef9a6a7559371568d8a (diff)
parent6d113a55ea3310d0ca17a36aeef594b82e52f65c (diff)
downloaddotfiles-92f6cd0b0a283d2a949e83838c48e2e8cece1156.tar.gz
dotfiles-92f6cd0b0a283d2a949e83838c48e2e8cece1156.tar.bz2
dotfiles-92f6cd0b0a283d2a949e83838c48e2e8cece1156.zip
Merge branch 'hotfix/0.4.1' into develop
-rw-r--r--dotfiles/cli.py17
-rw-r--r--dotfiles/core.py2
2 files changed, 10 insertions, 9 deletions
diff --git a/dotfiles/cli.py b/dotfiles/cli.py
index d00788e..b77fb95 100644
--- a/dotfiles/cli.py
+++ b/dotfiles/cli.py
@@ -11,7 +11,7 @@ from . import core
import ConfigParser
from optparse import OptionParser, OptionGroup
-DEFAULT_REPO = "~/Dotfiles"
+DEFAULT_REPO = os.path.expanduser('~/Dotfiles')
def parse_args():
@@ -96,7 +96,7 @@ def main():
if 'dotfiles' in parser.sections():
if not opts.repo and parser.get('dotfiles', 'repository'):
- opts.repo = os.path.expanduser(parser.get('dotfiles', 'repository'))
+ opts.repo = parser.get('dotfiles', 'repository')
if opts.action == 'move':
# TODO: update the configuration file after the move
print 'Remember to update the repository location ' \
@@ -112,17 +112,17 @@ def main():
opts.externals = eval(parser.get('dotfiles', 'externals'))
if not opts.repo:
- opts.repo = os.path.expanduser(DEFAULT_REPO)
+ opts.repo = DEFAULT_REPO
+
+ opts.repo = os.path.realpath(os.path.expanduser(opts.repo))
if not opts.prefix:
opts.prefix = ''
if not os.path.exists(opts.repo):
- if opts.repo == os.path.expanduser(DEFAULT_REPO):
- print "Error: Could not find dotfiles repository \"%s\"" % DEFAULT_REPO
+ print 'Error: Could not find dotfiles repository \"%s\"' % (opts.repo)
+ if opts.repo == DEFAULT_REPO:
missing_default_repo()
- else:
- print "Error: Could not find dotfiles repository \"%s\"" % opts.repo
exit(-1)
if not opts.action:
@@ -158,7 +158,8 @@ def missing_default_repo():
print """
If this is your first time running dotfiles, you must first create
-a repository. By default, dotfiles will look for '{0}'. Something like:
+a repository. By default, dotfiles will look for '{0}'.
+Something like:
$ mkdir {0}
diff --git a/dotfiles/core.py b/dotfiles/core.py
index 4c8add4..e99811b 100644
--- a/dotfiles/core.py
+++ b/dotfiles/core.py
@@ -11,7 +11,7 @@ import os
import shutil
-__version__ = '0.4.0'
+__version__ = '0.4.1'
__author__ = "Jon Bernard"
__license__ = "GPL"