mirror of
https://shylinux.com/x/icebergs
synced 2025-06-26 18:37:29 +08:00
opt some
This commit is contained in:
parent
735328816b
commit
8fd16ff52c
@ -140,11 +140,13 @@ func init() {
|
|||||||
cli.CMD, []interface{}{"ice.bin", SPACE, tcp.DIAL},
|
cli.CMD, []interface{}{"ice.bin", SPACE, tcp.DIAL},
|
||||||
cli.ENV, kit.Dict(ice.CTX_LOG, ice.BIN_BOOTLOG),
|
cli.ENV, kit.Dict(ice.CTX_LOG, ice.BIN_BOOTLOG),
|
||||||
"miss", `#!/bin/bash
|
"miss", `#!/bin/bash
|
||||||
[ -f $PWD/.ish/plug.sh ] || [ -f $HOME/.ish/plug.sh ] || git clone ${ISH_CONF_HUB_PROXY:="https://"}shylinux.com/x/intshell $PWD/.ish
|
if [ "$ISH_CONF_PRE" = "" ]; then
|
||||||
[ "$ISH_CONF_PRE" != "" ] || source $PWD/.ish/plug.sh || source $HOME/.ish/plug.sh
|
[ -f $PWD/.ish/plug.sh ] || [ -f $HOME/.ish/plug.sh ] || git clone ${ISH_CONF_HUB_PROXY:="https://"}shylinux.com/x/intshell $PWD/.ish
|
||||||
require miss.sh
|
source $PWD/.ish/plug.sh || source $HOME/.ish/plug.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# ish_miss_prepare_compile
|
require miss.sh
|
||||||
|
ish_miss_prepare_compile
|
||||||
ish_miss_prepare_develop
|
ish_miss_prepare_develop
|
||||||
ish_miss_prepare_install
|
ish_miss_prepare_install
|
||||||
|
|
||||||
|
@ -305,6 +305,9 @@ func init() {
|
|||||||
_share_repos(m, path.Join(arg[0], arg[1], arg[2]), arg[3:]...)
|
_share_repos(m, path.Join(arg[0], arg[1], arg[2]), arg[3:]...)
|
||||||
}},
|
}},
|
||||||
"/help/": {Name: "/help/", Help: "帮助", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
"/help/": {Name: "/help/", Help: "帮助", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
|
if len(arg) == 0 {
|
||||||
|
arg = append(arg, "tutor.shy")
|
||||||
|
}
|
||||||
if len(arg) > 0 && arg[0] != ctx.ACTION {
|
if len(arg) > 0 && arg[0] != ctx.ACTION {
|
||||||
arg[0] = "src/help/" + arg[0]
|
arg[0] = "src/help/" + arg[0]
|
||||||
}
|
}
|
||||||
|
@ -281,13 +281,15 @@ func init() {
|
|||||||
|
|
||||||
switch kind {
|
switch kind {
|
||||||
case CHROME: // 交互节点
|
case CHROME: // 交互节点
|
||||||
switch m.Option("cmd") {
|
m.Go(func(msg *ice.Message) {
|
||||||
case "pwd":
|
switch m.Option("cmd") {
|
||||||
m.Go(func(msg *ice.Message) {
|
case "pwd":
|
||||||
link := kit.MergeURL(_space_domain(msg), "grant", name)
|
link := kit.MergeURL(_space_domain(msg), "grant", name)
|
||||||
msg.Sleep("100ms").Cmd(SPACE, name, "pwd", name, link, msg.Cmdx(cli.QRCODE, link))
|
msg.Sleep("100ms").Cmd(SPACE, name, "pwd", name, link, msg.Cmdx(cli.QRCODE, link))
|
||||||
})
|
default:
|
||||||
}
|
msg.Sleep("100ms").Cmd(SPACE, name, "pwd", name)
|
||||||
|
}
|
||||||
|
})
|
||||||
case WORKER: // 工作节点
|
case WORKER: // 工作节点
|
||||||
m.Event(DREAM_START, args...)
|
m.Event(DREAM_START, args...)
|
||||||
defer m.Event(DREAM_STOP, args...)
|
defer m.Event(DREAM_STOP, args...)
|
||||||
|
@ -88,6 +88,10 @@ func _spide_show(m *ice.Message, arg ...string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for k, v := range res.Header {
|
||||||
|
m.Debug("%v: %v", k, v)
|
||||||
|
}
|
||||||
|
|
||||||
// 检查结果
|
// 检查结果
|
||||||
defer res.Body.Close()
|
defer res.Body.Close()
|
||||||
m.Cost(kit.MDB_STATUS, res.Status, kit.MDB_SIZE, res.Header.Get(ContentLength), kit.MDB_TYPE, res.Header.Get(ContentType))
|
m.Cost(kit.MDB_STATUS, res.Status, kit.MDB_SIZE, res.Header.Get(ContentLength), kit.MDB_TYPE, res.Header.Get(ContentType))
|
||||||
@ -108,6 +112,7 @@ func _spide_show(m *ice.Message, arg ...string) {
|
|||||||
m.Warn(true, ice.ErrNotRight, " of ", uri)
|
m.Warn(true, ice.ErrNotRight, " of ", uri)
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
misc.go
8
misc.go
@ -466,3 +466,11 @@ func (m *Message) SetResult() {
|
|||||||
m.Set(MSG_RESULT)
|
m.Set(MSG_RESULT)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *Message) AppendTrans(cb func(value string, key string, index int) string) {
|
||||||
|
for _, k := range m.meta[MSG_APPEND] {
|
||||||
|
for i, v := range m.meta[k] {
|
||||||
|
m.meta[k][i] = cb(v, k, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -67,15 +67,16 @@ func _status_list(m *ice.Message) (files, adds, dels int, last time.Time) {
|
|||||||
m.Push(kit.MDB_NAME, value[kit.MDB_NAME])
|
m.Push(kit.MDB_NAME, value[kit.MDB_NAME])
|
||||||
m.Push(kit.MDB_TYPE, vs[0])
|
m.Push(kit.MDB_TYPE, vs[0])
|
||||||
m.Push(kit.MDB_FILE, vs[1])
|
m.Push(kit.MDB_FILE, vs[1])
|
||||||
m.Push("tags", tags)
|
|
||||||
|
|
||||||
list := []string{}
|
list := []string{}
|
||||||
switch vs[0] {
|
switch vs[0] {
|
||||||
case "##":
|
case "##":
|
||||||
|
m.Push("tags", tags)
|
||||||
if strings.Contains(vs[1], "ahead") {
|
if strings.Contains(vs[1], "ahead") {
|
||||||
list = append(list, PUSH)
|
list = append(list, PUSH)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
m.Push("tags", "")
|
||||||
if strings.Contains(vs[0], "??") {
|
if strings.Contains(vs[0], "??") {
|
||||||
list = append(list, ADD)
|
list = append(list, ADD)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user