aboutsummaryrefslogtreecommitdiff
path: root/stage2/AdminStage2.scala
diff options
context:
space:
mode:
Diffstat (limited to 'stage2/AdminStage2.scala')
-rw-r--r--stage2/AdminStage2.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/stage2/AdminStage2.scala b/stage2/AdminStage2.scala
index 4120b1c..59f8f7d 100644
--- a/stage2/AdminStage2.scala
+++ b/stage2/AdminStage2.scala
@@ -1,11 +1,12 @@
package cbt
object AdminStage2{
- def main(args: Array[String]) = {
- val init = new Init(args.drop(3))
+ def main(_args: Array[String]) = {
+ val args = _args.drop(1).dropWhile(Seq("admin","direct") contains _)
+ val init = new Init(args)
val lib = new Lib(init.logger)
- val adminTasks = new AdminTasks(lib, args.drop(3))
+ val adminTasks = new AdminTasks(lib, args)
new lib.ReflectObject(adminTasks){
def usage: String = "Available methods: " ++ lib.taskNames(subclassType).mkString(" ")
- }.callNullary(args.lift(2))
+ }.callNullary(args.lift(0))
}
}