Adding in/out file validation
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package com.minres.tgc.hammer
|
||||
|
||||
import ch.qos.logback.classic.Level
|
||||
import com.minres.tgc.hammer.cli.{HammerConf, MySubcommand}
|
||||
import com.typesafe.scalalogging.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
import scala.compiletime.uninitialized
|
||||
|
||||
@@ -8,8 +11,19 @@ object Main {
|
||||
var conf: HammerConf = uninitialized
|
||||
|
||||
def main(args: Array[String]): Unit = {
|
||||
var logger = Logger("TGCHammer")
|
||||
conf = new HammerConf(args.toIndexedSeq)
|
||||
|
||||
val logLevel = conf.verbose() match {
|
||||
case 0 => Level.WARN
|
||||
case 1 => Level.INFO
|
||||
case 2 => Level.DEBUG
|
||||
case _ => Level.TRACE
|
||||
}
|
||||
LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME).asInstanceOf[ch.qos.logback.classic.Logger].setLevel(logLevel)
|
||||
|
||||
os.makeDir(Global.OUT_DIR)
|
||||
os.makeDir(Global.TMP_DIR)
|
||||
conf.subcommand match {
|
||||
case Some(c: MySubcommand) =>
|
||||
val tasks = c.getRequiredTasks
|
||||
|
Reference in New Issue
Block a user