Klib path component is not required anymore.
This commit is contained in:
committed by
alexander-gorshenev
parent
0efa78d4a0
commit
a4f8333c94
@@ -74,7 +74,7 @@ fun error(text: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Get rid of the hardcoded path.
|
// TODO: Get rid of the hardcoded path.
|
||||||
val defaultRepository = File(File.userHome, ".konan")
|
val defaultRepository = File(File.userHome, ".konan/klib")
|
||||||
|
|
||||||
class Library(val name: String, val requestedRepository: String?, val target: String) {
|
class Library(val name: String, val requestedRepository: String?, val target: String) {
|
||||||
|
|
||||||
@@ -97,8 +97,7 @@ class Library(val name: String, val requestedRepository: String?, val target: St
|
|||||||
Library(File(name).name.removeSuffix(".klib"), requestedRepository, target).remove(true)
|
Library(File(name).name.removeSuffix(".klib"), requestedRepository, target).remove(true)
|
||||||
|
|
||||||
val library = ZippedKonanLibrary(libraryInCurrentDir(name))
|
val library = ZippedKonanLibrary(libraryInCurrentDir(name))
|
||||||
val newLocation = File(repository, "klib")
|
val newLibDir = File(repository, library.libraryName.File().name)
|
||||||
val newLibDir = File(newLocation, library.libraryName.File().name)
|
|
||||||
newLibDir.mkdirs()
|
newLibDir.mkdirs()
|
||||||
library.unpackTo(newLibDir)
|
library.unpackTo(newLibDir)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user