This commit is contained in:
Dominik Picheta 2013-10-05 18:17:52 +01:00
commit 05d662152a
2 changed files with 4 additions and 3 deletions

View file

@ -242,9 +242,10 @@ proc installFromDir(dir: string, latest: bool): string =
# Dependencies need to be processed before the creation of the pkg dir.
let paths = processDeps(pkginfo)
if pkgInfo.bin.len > 0: buildFromDir(pkgInfo, paths)
createDir(pkgDestDir)
if pkgInfo.bin.len > 0:
buildFromDir(pkgInfo, paths)
createDir(binDir)
# Copy all binaries and files that are not skipped
copyFilesRec(realDir, realDir, pkgDestDir, pkgInfo)

View file

@ -3,14 +3,14 @@
#
# Various miscellaneous utility functions reside here.
import osproc, pegs, strutils, os
import version
import version, common
# TODO: Merge with common.nim?
proc doCmd*(cmd: string) =
let exitCode = execCmd(cmd)
if exitCode != QuitSuccess:
quit("Execution failed with exit code " & $exitCode, QuitFailure)
raise newException(EBabel, "Execution failed with exit code " & $exitCode)
template cd*(dir: string, body: stmt) =
## Sets the current dir to ``dir``, executes ``body`` and restores the