Don't check whether a dir exists in createDirs(), echo status of copying other files.
This commit is contained in:
parent
bcc94d7e76
commit
89b7339c64
3 changed files with 6 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ description = """Babel framework: Specifies a common interface for programmers
|
||||||
[Library]
|
[Library]
|
||||||
Depends = "nimrod >= 0.8.10"
|
Depends = "nimrod >= 0.8.10"
|
||||||
ExposedModules = "parser, installer, version" ; No need for .nim
|
ExposedModules = "parser, installer, version" ; No need for .nim
|
||||||
|
Files = "babel.babel"
|
||||||
|
|
||||||
;[Bin babel]
|
;[Bin babel]
|
||||||
;Depends = "nimrod >= 0.8.11"
|
;Depends = "nimrod >= 0.8.11"
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,7 @@ proc verifyDepends(proj: TProject): seq[TDepend] =
|
||||||
|
|
||||||
proc createDirs(dirs: seq[string]) =
|
proc createDirs(dirs: seq[string]) =
|
||||||
for i in items(dirs):
|
for i in items(dirs):
|
||||||
if not existsDir(i):
|
createDir(i)
|
||||||
createDir(i)
|
|
||||||
|
|
||||||
proc copyFiles(proj: TProject) =
|
proc copyFiles(proj: TProject) =
|
||||||
# This will create a $home/.babel and lib/ or bin/. It will also copy all the
|
# This will create a $home/.babel and lib/ or bin/. It will also copy all the
|
||||||
|
|
@ -84,7 +83,9 @@ proc copyFiles(proj: TProject) =
|
||||||
echo(" Done!")
|
echo(" Done!")
|
||||||
if proj.files.len > 0:
|
if proj.files.len > 0:
|
||||||
for i in items(proj.files):
|
for i in items(proj.files):
|
||||||
|
stdout.write("Copying " & i.addFileExt("nim") & "...")
|
||||||
copyFile(i, projDir / i)
|
copyFile(i, projDir / i)
|
||||||
|
echo(" Done!")
|
||||||
|
|
||||||
elif proj.executable:
|
elif proj.executable:
|
||||||
# TODO: Copy files for executable.
|
# TODO: Copy files for executable.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ type
|
||||||
|
|
||||||
unknownFields*: seq[string] # TODO:
|
unknownFields*: seq[string] # TODO:
|
||||||
|
|
||||||
EParseErr* = object of EBase
|
EParseErr* = object of EIO
|
||||||
|
|
||||||
proc initProj(): TProject =
|
proc initProj(): TProject =
|
||||||
result.name = ""
|
result.name = ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue