mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-28 05:27:06 -05:00
Create dest dirs if they don't exist
This commit is contained in:
parent
7cff5f8cee
commit
9a66edb5d0
@ -14,6 +14,9 @@ installed_packages = pacman.get_installed()
|
|||||||
|
|
||||||
def copy(source, dest):
|
def copy(source, dest):
|
||||||
print(source, '->', dest)
|
print(source, '->', dest)
|
||||||
|
if not dest.parent.is_dir():
|
||||||
|
distutils.dir_util.mkpath(str(dest.parent))
|
||||||
|
|
||||||
if source.is_dir():
|
if source.is_dir():
|
||||||
distutils.dir_util.copy_tree(str(source), str(dest))
|
distutils.dir_util.copy_tree(str(source), str(dest))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user