From 9a66edb5d0128d4a5462fe883423efe2f1315f66 Mon Sep 17 00:00:00 2001 From: Jack Foltz Date: Wed, 12 Dec 2018 09:45:13 -0500 Subject: [PATCH] Create dest dirs if they don't exist --- lib/deploy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/deploy.py b/lib/deploy.py index 8bca1a8..4710ae2 100644 --- a/lib/deploy.py +++ b/lib/deploy.py @@ -14,6 +14,9 @@ installed_packages = pacman.get_installed() def copy(source, dest): print(source, '->', dest) + if not dest.parent.is_dir(): + distutils.dir_util.mkpath(str(dest.parent)) + if source.is_dir(): distutils.dir_util.copy_tree(str(source), str(dest)) else: