1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-24 04:22:50 -05:00

Create dest dirs if they don't exist

This commit is contained in:
Jack Foltz 2018-12-12 09:45:13 -05:00
parent 7cff5f8cee
commit 9a66edb5d0
Signed by: foltik
GPG Key ID: D1F0331758D1F29A

View File

@ -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: