Support deprecated directory

This commit is contained in:
ligi 2021-02-05 11:52:13 +01:00
parent 49c826df5c
commit 934e2d674b
No known key found for this signature in database
GPG Key ID: 8E81894010ABF23D

View File

@ -13,10 +13,16 @@ val parsedNames= mutableSetOf<String>()
fun main(args: Array<String>) {
File("_data/chains").listFiles()?.forEach {
val allFiles = File("_data/chains").listFiles()?:return
allFiles.filter { !it.isDirectory }.forEach {
checkChain(it, args.contains("rpcConnect"))
}
allFiles.filter { it.isDirectory }.forEach {
if (it.name != "deprecated") {
error("the only directory allowed is 'deprecated'")
}
}
}
fun checkChain(it: File, connectRPC: Boolean) {