From 05d662152a129e03a93cf3428f21462f3e837fc1 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sat, 5 Oct 2013 18:17:52 +0100 Subject: [PATCH] Fixes #7 --- babel.nim | 3 ++- tools.nim | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/babel.nim b/babel.nim index 2511324..3a6423b 100644 --- a/babel.nim +++ b/babel.nim @@ -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) diff --git a/tools.nim b/tools.nim index e82d98c..0a45a74 100644 --- a/tools.nim +++ b/tools.nim @@ -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