koch.nim: critical fix for the tar.xz installations
This commit is contained in:
parent
86c73cdfc2
commit
5ce414141e
1 changed files with 18 additions and 14 deletions
6
koch.nim
6
koch.nim
|
|
@ -188,9 +188,13 @@ proc buildNimble(latest: bool) =
|
||||||
# here so that it cannot cause problems (nimble bug #306):
|
# here so that it cannot cause problems (nimble bug #306):
|
||||||
if dirExists("bin/nimblepkg"):
|
if dirExists("bin/nimblepkg"):
|
||||||
removeDir("bin/nimblepkg")
|
removeDir("bin/nimblepkg")
|
||||||
|
# if koch is used for a tar.xz, build the dist/nimble we shipped
|
||||||
|
# with the tarball:
|
||||||
var installDir = "dist/nimble"
|
var installDir = "dist/nimble"
|
||||||
|
if not latest and dirExists(installDir) and not dirExists("dist/nimble/.git"):
|
||||||
|
discard "don't do the git dance"
|
||||||
|
else:
|
||||||
if not dirExists("dist/nimble/.git"):
|
if not dirExists("dist/nimble/.git"):
|
||||||
# if dist/nimble exist, but is not a git repo, don't mess with it:
|
|
||||||
if dirExists(installDir):
|
if dirExists(installDir):
|
||||||
var id = 0
|
var id = 0
|
||||||
while dirExists("dist/nimble" & $id):
|
while dirExists("dist/nimble" & $id):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue