From 8bf3418fd5f4811835a72c2edb395dea8799851b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 23 Jul 2010 07:45:48 -0400 Subject: [PATCH] Create the static directory if it is missing Since we don't have any files in it at the moment, and Git doesn't track empty directories. --- bin/cook.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cook.py b/bin/cook.py index 42fc032..bd02860 100755 --- a/bin/cook.py +++ b/bin/cook.py @@ -19,6 +19,7 @@ from __future__ import with_statement +import os import os.path import uuid @@ -84,6 +85,8 @@ if __name__ == '__main__': sys.stderr.write('Serving cookbook\n') module_dir = os.path.dirname(os.path.abspath(cookbook.__file__)) static_dir = os.path.join(module_dir, 'static') + if not os.path.exists(static_dir): + os.mkdir(static_dir) template_dir = os.path.join(module_dir, 'template') config = os.path.join(module_dir, 'config') s = Server(c, template_dir) -- 2.26.2