diff options
author | Jon Bernard <jbernard@tuxion.com> | 2013-06-27 10:55:01 -0400 |
---|---|---|
committer | Jon Bernard <jbernard@tuxion.com> | 2013-11-07 09:38:44 -0500 |
commit | 6676d85be6285826b9c1df73ce878ba9c667489d (patch) | |
tree | 754ff51b328b3ec8b1b52a77349acfb3bec53059 | |
parent | 33f63740fdc9e738a9638d94f0f646c762472b89 (diff) | |
download | dotfiles-6676d85be6285826b9c1df73ce878ba9c667489d.tar.gz dotfiles-6676d85be6285826b9c1df73ce878ba9c667489d.tar.bz2 dotfiles-6676d85be6285826b9c1df73ce878ba9c667489d.zip |
Create non-existent package directories
Closes #17.
-rw-r--r-- | dotfiles/core.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dotfiles/core.py b/dotfiles/core.py index f2b492b..e4c4ec6 100644 --- a/dotfiles/core.py +++ b/dotfiles/core.py @@ -211,6 +211,9 @@ class Dotfiles(object): if pkg_name in self.packages: home = os.path.join(self.homedir, sub_dir) target = self._fqpn(file, pkg_name=pkg_name) + dirname = os.path.dirname(target) + if not os.path.exists(dirname): + os.makedirs(dirname) else: home = self.homedir target = self._fqpn(file) |