[fix] won't work if dir doesn't exists

This commit is contained in:
Laurent Peuch 2015-12-09 09:03:18 +01:00
parent 6ee2d9406b
commit dae6852fb0

View File

@ -66,7 +66,8 @@ def main():
os.makedirs("build")
# XXX recursively merge directories
shutil.rmtree(os.path.join(os.getcwd(), "build", "static"))
if os.path.exists(os.path.join(os.getcwd(), "build", "static")):
shutil.rmtree(os.path.join(os.getcwd(), "build", "static"))
shutil.copytree(os.path.join(os.path.split(os.path.realpath(__file__))[0], "static"), os.path.join(os.getcwd(), "build", "static"))
for gallery in dirs: