From 89b7339c64c11ef3318e1bb42fbba884fe28a990 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Thu, 27 Jan 2011 21:52:13 +0000 Subject: [PATCH] Don't check whether a dir exists in createDirs(), echo status of copying other files. --- babel.babel | 1 + installer.nim | 7 ++++--- parser.nim | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/babel.babel b/babel.babel index 7c37281..b299cb1 100644 --- a/babel.babel +++ b/babel.babel @@ -9,6 +9,7 @@ description = """Babel framework: Specifies a common interface for programmers [Library] Depends = "nimrod >= 0.8.10" ExposedModules = "parser, installer, version" ; No need for .nim +Files = "babel.babel" ;[Bin babel] ;Depends = "nimrod >= 0.8.11" diff --git a/installer.nim b/installer.nim index 8742c72..326c8bc 100644 --- a/installer.nim +++ b/installer.nim @@ -60,8 +60,7 @@ proc verifyDepends(proj: TProject): seq[TDepend] = proc createDirs(dirs: seq[string]) = for i in items(dirs): - if not existsDir(i): - createDir(i) + createDir(i) proc copyFiles(proj: TProject) = # This will create a $home/.babel and lib/ or bin/. It will also copy all the @@ -84,8 +83,10 @@ proc copyFiles(proj: TProject) = echo(" Done!") if proj.files.len > 0: for i in items(proj.files): + stdout.write("Copying " & i.addFileExt("nim") & "...") copyFile(i, projDir / i) - + echo(" Done!") + elif proj.executable: # TODO: Copy files for executable. assert(false) diff --git a/parser.nim b/parser.nim index 6ed2976..bc7bdbf 100644 --- a/parser.nim +++ b/parser.nim @@ -19,7 +19,7 @@ type unknownFields*: seq[string] # TODO: - EParseErr* = object of EBase + EParseErr* = object of EIO proc initProj(): TProject = result.name = ""