diff options
author | Bas van Kervel <basvankervel@gmail.com> | 2015-06-19 20:04:18 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2015-06-22 15:17:09 +0800 |
commit | f87501b1c547a1d9cd882497ffafbab4f9941ef1 (patch) | |
tree | bc8e29d494105457cfae1db4ac2b1e0c36e4a0a1 /cmd/geth/main.go | |
parent | 3ff272b618b8bd63c9e3068d5f4be5d0b7c7c676 (diff) | |
download | dexon-f87501b1c547a1d9cd882497ffafbab4f9941ef1.tar dexon-f87501b1c547a1d9cd882497ffafbab4f9941ef1.tar.gz dexon-f87501b1c547a1d9cd882497ffafbab4f9941ef1.tar.bz2 dexon-f87501b1c547a1d9cd882497ffafbab4f9941ef1.tar.lz dexon-f87501b1c547a1d9cd882497ffafbab4f9941ef1.tar.xz dexon-f87501b1c547a1d9cd882497ffafbab4f9941ef1.tar.zst dexon-f87501b1c547a1d9cd882497ffafbab4f9941ef1.zip |
added batch support to console and attach actions
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r-- | cmd/geth/main.go | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index f1e8ace3d..e5c3614fc 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -255,6 +255,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.IPCDisabledFlag, utils.IPCApiFlag, utils.IPCPathFlag, + utils.ExecFlag, utils.WhisperEnabledFlag, utils.VMDebugFlag, utils.ProtocolVersionFlag, @@ -337,8 +338,12 @@ func attach(ctx *cli.Context) { true, nil) - repl.welcome() - repl.interactive() + if ctx.GlobalString(utils.ExecFlag.Name) != "" { + repl.batch(ctx.GlobalString(utils.ExecFlag.Name)) + } else { + repl.welcome() + repl.interactive() + } } func console(ctx *cli.Context) { @@ -368,8 +373,12 @@ func console(ctx *cli.Context) { nil, ) - repl.welcome() - repl.interactive() + if ctx.GlobalString(utils.ExecFlag.Name) != "" { + repl.batch(ctx.GlobalString(utils.ExecFlag.Name)) + } else { + repl.welcome() + repl.interactive() + } ethereum.Stop() ethereum.WaitForShutdown() |