forked from x/icebergs
add some
This commit is contained in:
parent
fd319e30e4
commit
e4d0d98702
@ -110,7 +110,7 @@ func init() {
|
||||
return
|
||||
}
|
||||
for i, v := range arg[1:] {
|
||||
kit.Value(cmd.List, kit.Keys(i, "value"), v)
|
||||
kit.Value(cmd.List, kit.Keys(i, mdb.VALUE), v)
|
||||
}
|
||||
})
|
||||
}},
|
||||
|
@ -346,6 +346,8 @@ func init() {
|
||||
kit.If(m.Option(mdb.NAME) == "", func() { m.Sleep("5s").Cmdy(ROUTE, cli.BUILD).ProcessInner() })
|
||||
}},
|
||||
"gowork": {Name: "gowork name", Help: "工作区", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmd(cli.SYSTEM, cli.GO, "work", "init")
|
||||
m.Cmd(cli.SYSTEM, cli.GO, "work", "use", ".")
|
||||
DreamEach(m, m.Option(mdb.NAME), "", func(name string) {
|
||||
m.Cmd(cli.SYSTEM, cli.GO, "work", "use", path.Join(ice.USR_LOCAL_WORK, name))
|
||||
})
|
||||
|
@ -161,7 +161,7 @@ const CONNECT = "connect"
|
||||
func init() {
|
||||
psh.Index.MergeCommands(ice.Commands{
|
||||
CONNECT: {Help: "连接", Actions: ice.MergeActions(ice.Actions{
|
||||
tcp.OPEN: {Name: "open authfile username=shy host=shylinux.com port=22 cmds private=.ssh/id_rsa password verfiy", Help: "终端", Hand: func(m *ice.Message, arg ...string) {
|
||||
tcp.OPEN: {Name: "open authfile username=shy host=shylinux.com port=22 cmds init private=.ssh/id_rsa password verfiy", Help: "终端", Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.Option(ctx.CMDS) == "" {
|
||||
defer nfs.OptionLoad(m, m.Option(AUTHFILE)).Echo("exit %s@%s:%s\n", m.Option(aaa.USERNAME), m.Option(tcp.HOST), m.Option(tcp.PORT))
|
||||
_ssh_open(m.SetResult(), arg...)
|
||||
|
@ -164,7 +164,11 @@ func (s relay) Publish(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(nfs.DIR, ice.USR_PUBLISH).PushAction()
|
||||
return
|
||||
}
|
||||
m.Cmd(nfs.SAVE, kit.HomePath(".ssh/"+m.Option(MACHINE)+".json"), kit.Formats(kit.Dict(m.OptionSimple("username,host,port")))+ice.NL)
|
||||
if m.Option(ice.INIT, ""); m.Option(web.PORTAL) != "" {
|
||||
m.Option(ice.INIT, kit.Format("cd %s", path.Base(m.DreamPath(m.Option(web.DREAM)))))
|
||||
}
|
||||
m.Debug("what %v", m.Option(web.PORTAL))
|
||||
m.Cmd(nfs.SAVE, kit.HomePath(".ssh/"+m.Option(MACHINE)+".json"), kit.Formats(kit.Dict(m.OptionSimple("username,host,port,init")))+ice.NL)
|
||||
kit.If(!m.Exists(path.Join(ice.USR_PUBLISH, RELAY)), func() { s.Compile(m) })
|
||||
os.Symlink(RELAY, ice.USR_PUBLISH+m.Option(MACHINE))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user