1
0
forked from x/icebergs
This commit is contained in:
shylinux@163.com 2022-08-27 18:50:10 +08:00
parent db64c6a7e1
commit 71d5799d8c
2 changed files with 16 additions and 8 deletions

View File

@ -89,7 +89,16 @@ func _install_build(m *ice.Message, arg ...string) string {
return ""
}
func _install_order(m *ice.Message, arg ...string) {
m.Cmdy(cli.SYSTEM, nfs.PUSH, path.Join(_install_path(m, ""), m.Option(nfs.PATH)+ice.NL))
p := _install_path(m, "")
if m.Option(nfs.PATH) == "" {
for _, v := range []string{"_install/bin", "bin", ""} {
if nfs.ExistsFile(m, path.Join(p, v)) {
m.Option(nfs.PATH, v)
break
}
}
}
m.Cmdy(cli.SYSTEM, nfs.PUSH, path.Join(p, m.Option(nfs.PATH))+ice.NL)
}
func _install_spawn(m *ice.Message, arg ...string) {
if kit.Int(m.Option(tcp.PORT)) >= 10000 {
@ -201,8 +210,10 @@ func init() {
if m.Option(nfs.DIR_ROOT, path.Join(_install_path(m, ""), _INSTALL)); !nfs.ExistsFile(m, m.Option(nfs.DIR_ROOT)) {
m.Option(nfs.DIR_ROOT, path.Join(_install_path(m, "")))
}
m.Cmdy(nfs.DIR, m.Option(nfs.PATH))
m.StatusTimeCount(nfs.PATH, m.Option(nfs.DIR_ROOT))
if m.Option(nfs.DIR_ROOT) == "" {
return
}
m.Cmdy(nfs.DIR, m.Option(nfs.PATH)).Sort(nfs.PATH).StatusTimeCount(nfs.PATH, m.Option(nfs.DIR_ROOT))
}},
}, mdb.HashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,name,path,link")), Hand: func(m *ice.Message, arg ...string) {
switch len(arg) {

View File

@ -24,14 +24,11 @@ func (s compile) Init(m *ice.Message) {
cli.IsAlpine(m.Message, NODE, "nodejs")
})
}
func (s compile) Order(m *ice.Message) {
s.Code.Order(m, "", ice.BIN)
func (s compile) List(m *ice.Message, arg ...string) {
s.Code.Source(m, "", arg...)
}
func (s compile) Xterm(m *ice.Message, arg ...string) {
s.Code.Xterm(m, NODE, arg...)
}
func (s compile) List(m *ice.Message, arg ...string) {
s.Code.Source(m, "", arg...)
}
func init() { ice.CodeCtxCmd(compile{}) }