mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
Support deprecated directory
This commit is contained in:
parent
49c826df5c
commit
934e2d674b
|
@ -13,10 +13,16 @@ val parsedNames= mutableSetOf<String>()
|
||||||
|
|
||||||
fun main(args: Array<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"))
|
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) {
|
fun checkChain(it: File, connectRPC: Boolean) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user