From 0c171992c10c0e88b126173cd1f9b705f4e6934b Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Mon, 27 Mar 2017 15:36:14 +0700 Subject: [PATCH] tools: Fix path to dependencies --- tools/helpers/src/main/kotlin/DependencyDownloader.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/helpers/src/main/kotlin/DependencyDownloader.kt b/tools/helpers/src/main/kotlin/DependencyDownloader.kt index 14da4f85487..6becd063da4 100644 --- a/tools/helpers/src/main/kotlin/DependencyDownloader.kt +++ b/tools/helpers/src/main/kotlin/DependencyDownloader.kt @@ -31,8 +31,8 @@ class DependencyDownloader(dependenciesRoot: File, val properties: Properties, v return result } - private fun processDependency(path: String) { - val depDir = File(path) + private fun processDependency(dependency: String) { + val depDir = File(dependenciesRoot, dependency) val depName = depDir.name val inListFile = listFile.containsLine(depName) if (inListFile && depDir.exists()) { @@ -43,7 +43,6 @@ class DependencyDownloader(dependenciesRoot: File, val properties: Properties, v isInfoShown = true } val downloaded = download(depName) - println("Extract dependency: $downloaded -> $depDir") extract(downloaded) if (!inListFile) { listFile.appendText("$depName\n") @@ -51,6 +50,7 @@ class DependencyDownloader(dependenciesRoot: File, val properties: Properties, v } private fun extract(tarGz: File) { + println("Extract dependency: ${tarGz.canonicalPath}") val tarProcess = ProcessBuilder().apply { command("tar", "-xzf", "${tarGz.canonicalPath}") directory(tarGz.parentFile) @@ -109,7 +109,6 @@ class DependencyDownloader(dependenciesRoot: File, val properties: Properties, v } // TODO: Improve console logging - var msgLen = 0 while (!done) { Thread.sleep(1000) // We can use condition variable here. updateProgressMsg(url.toString(), currentBytes, totalBytes)