Skip to content

Commit

Permalink
Making create aware of directories
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Wilson committed Jun 26, 2012
1 parent 072c13f commit 5c5e7ce
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions create_project.py
Expand Up @@ -46,32 +46,32 @@ def copyTemplate(source, destination, variables):

try:
shermanPath = os.path.dirname(os.path.abspath(__file__))

os.mkdir(config.targetDirectory)
copyTemplate("templates/Makefile", config.targetDirectory + "/Makefile", {
copyTemplate(shermanPath + "/templates/Makefile", config.targetDirectory + "/Makefile", {
"shermanPath": shermanPath
})
copyTemplate("templates/project-manifest.json", config.targetDirectory + "/project-manifest.json", {
copyTemplate(shermanPath + "/templates/project-manifest.json", config.targetDirectory + "/project-manifest.json", {
"title": config.projectName
})

os.mkdir(config.targetDirectory + "/boot")
copyTemplate("templates/boot.tpl.html", config.targetDirectory + "/boot/boot.tpl.html", {
copyTemplate(shermanPath + "/templates/boot.tpl.html", config.targetDirectory + "/boot/boot.tpl.html", {
"title": buildutil.htmlEscape(config.projectName)
})
shutil.copy("templates/favicon.ico", config.targetDirectory + "/boot/favicon.ico")
shutil.copy(shermanPath + "/templates/favicon.ico", config.targetDirectory + "/boot/favicon.ico")

os.mkdir(config.targetDirectory + "/modules")
shutil.copytree("templates/core/css", config.targetDirectory + "/modules/core/css")
shutil.copytree("templates/core/i18n", config.targetDirectory + "/modules/core/i18n")
shutil.copytree("templates/core/js", config.targetDirectory + "/modules/core/js")
shutil.copytree("templates/core/tmpl", config.targetDirectory + "/modules/core/tmpl")
copyTemplate("templates/core/manifest.json", config.targetDirectory + "/modules/core/manifest.json", {
shutil.copytree(shermanPath + "/templates/core/css", config.targetDirectory + "/modules/core/css")
shutil.copytree(shermanPath + "/templates/core/i18n", config.targetDirectory + "/modules/core/i18n")
shutil.copytree(shermanPath + "/templates/core/js", config.targetDirectory + "/modules/core/js")
shutil.copytree(shermanPath + "/templates/core/tmpl", config.targetDirectory + "/modules/core/tmpl")
copyTemplate(shermanPath + "/templates/core/manifest.json", config.targetDirectory + "/modules/core/manifest.json", {
"namespace": config.namespace
})

shutil.copytree("templates/boot/js", config.targetDirectory + "/modules/boot/js")
copyTemplate("templates/boot/manifest.json", config.targetDirectory + "/modules/boot/manifest.json", {
shutil.copytree(shermanPath + "/templates/boot/js", config.targetDirectory + "/modules/boot/js")
copyTemplate(shermanPath + "/templates/boot/manifest.json", config.targetDirectory + "/modules/boot/manifest.json", {
"namespace": config.namespace
})

Expand Down

0 comments on commit 5c5e7ce

Please sign in to comment.