Merge branch 'master' into nimscript-support

This commit is contained in:
Dominik Picheta 2015-11-25 11:50:06 +00:00
commit a5b23fd226
2 changed files with 8 additions and 8 deletions

View file

@ -57,9 +57,9 @@ On Windows installing Nimble from source is slightly more complex:
git clone https://github.com/nim-lang/nimble.git git clone https://github.com/nim-lang/nimble.git
cd nimble cd nimble
nim c src\nimble nim c src/nimble
cp src\nimble.exe src\nimble1.exe cp src/nimble.exe src/nimble1.exe
src\nimble1.exe install src/nimble1.exe install
This is required because Windows will lock the process which is being run and This is required because Windows will lock the process which is being run and
during installation Nimble will recompile itself. during installation Nimble will recompile itself.

View file

@ -9,7 +9,7 @@ proc doCmd*(cmd: string) =
let bin = cmd.split(' ')[0] let bin = cmd.split(' ')[0]
if findExe(bin) == "": if findExe(bin) == "":
raise newException(NimbleError, "'" & bin & "' not in PATH.") raise newException(NimbleError, "'" & bin & "' not in PATH.")
# To keep output in sequence # To keep output in sequence
stdout.flushFile() stdout.flushFile()
stderr.flushFile() stderr.flushFile()
@ -36,8 +36,8 @@ template cd*(dir: string, body: stmt) =
proc getNimBin*: string = proc getNimBin*: string =
result = "nim" result = "nim"
if findExe("nim") != "": result = "nim" if findExe("nim") != "": result = findExe("nim")
elif findExe("nimrod") != "": result = "nimrod" elif findExe("nimrod") != "": result = findExe("nimrod")
proc getNimrodVersion*: Version = proc getNimrodVersion*: Version =
let nimBin = getNimBin() let nimBin = getNimBin()
@ -53,7 +53,7 @@ proc samePaths*(p1, p2: string): bool =
var cp2 = if not p2.endsWith("/"): p2 & "/" else: p2 var cp2 = if not p2.endsWith("/"): p2 & "/" else: p2
cp1 = cp1.replace('/', DirSep).replace('\\', DirSep) cp1 = cp1.replace('/', DirSep).replace('\\', DirSep)
cp2 = cp2.replace('/', DirSep).replace('\\', DirSep) cp2 = cp2.replace('/', DirSep).replace('\\', DirSep)
return cmpPaths(cp1, cp2) == 0 return cmpPaths(cp1, cp2) == 0
proc changeRoot*(origRoot, newRoot, path: string): string = proc changeRoot*(origRoot, newRoot, path: string): string =
@ -96,7 +96,7 @@ proc getDownloadDirName*(uri: string, verRange: VersionRange): string =
of strutils.Letters, strutils.Digits: of strutils.Letters, strutils.Digits:
result.add i result.add i
else: discard else: discard
let verSimple = getSimpleString(verRange) let verSimple = getSimpleString(verRange)
if verSimple != "": if verSimple != "":
result.add "_" result.add "_"