From 2a0528303fb18dcc6799405d62a3a6f19da20b4a Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Sat, 13 Jun 2015 19:02:46 +0200 Subject: added batch mode to console --- cmd/console/main.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cmd/console/main.go') diff --git a/cmd/console/main.go b/cmd/console/main.go index e8dd412ba..00a9ca9c4 100644 --- a/cmd/console/main.go +++ b/cmd/console/main.go @@ -40,7 +40,7 @@ const ( var ( gitCommit string // set via linker flag nodeNameVersion string - app = utils.NewApp(Version, "the ether console") + app = utils.NewApp(Version, "the geth console") ) func init() { @@ -93,8 +93,11 @@ func main() { func run(ctx *cli.Context) { jspath := ctx.GlobalString(utils.JSpathFlag.Name) ipcpath := utils.IpcSocketPath(ctx) - repl := newJSRE(jspath, ipcpath) - repl.welcome(ipcpath) - repl.interactive() + + if ctx.Args().Present() { + repl.batch(ctx.Args()) + } else { + repl.interactive(ipcpath) + } } -- cgit v1.2.3