forked from x/icebergs
opt some
This commit is contained in:
parent
fdef735fb2
commit
5821f3e258
2
base.go
2
base.go
@ -88,7 +88,7 @@ var Index = &Context{Name: "ice", Help: "冰山模块",
|
||||
m.root.Cost("_init")
|
||||
|
||||
m.target.root.wg = &sync.WaitGroup{}
|
||||
for _, k := range kit.Split(os.Getenv("ctx_mod")) {
|
||||
for _, k := range kit.Split(kit.Select("gdb,log,ssh,ctx", os.Getenv("ctx_mod"))) {
|
||||
m.Start(k)
|
||||
}
|
||||
|
||||
|
@ -2415,19 +2415,11 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
|
||||
|
||||
"/plugin/github.com/": {Name: "/space/", Help: "空间站", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
prefix := m.Conf(ice.WEB_SERVE, "meta.volcanos.require")
|
||||
if _, e := os.Stat(path.Join(prefix, cmd)); e != nil {
|
||||
m.Cmd(ice.CLI_SYSTEM, "git", "clone", "https://"+strings.Join(strings.Split(cmd, "/")[2:5], "/"),
|
||||
path.Join(prefix, strings.Join(strings.Split(cmd, "/")[1:5], "/")))
|
||||
repos := path.Join(strings.Split(cmd, "/")[2:5]...)
|
||||
if _, e := os.Stat(path.Join(prefix, repos)); e != nil {
|
||||
m.Cmd(ice.CLI_SYSTEM, "git", "clone", "https://"+repos, path.Join(prefix, repos))
|
||||
}
|
||||
m.Render(ice.RENDER_DOWNLOAD, path.Join(prefix, cmd))
|
||||
}},
|
||||
"/github.com/": {Name: "/space/", Help: "空间站", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
prefix := m.Conf(ice.WEB_SERVE, "meta.volcanos.require")
|
||||
if _, e := os.Stat(path.Join(prefix, cmd)); e != nil {
|
||||
m.Cmd(ice.CLI_SYSTEM, "git", "clone", "https://"+strings.Join(strings.Split(cmd, "/")[1:4], "/"),
|
||||
path.Join(prefix, strings.Join(strings.Split(cmd, "/")[1:4], "/")))
|
||||
}
|
||||
m.Render(ice.RENDER_DOWNLOAD, path.Join(prefix, cmd))
|
||||
m.Render(ice.RENDER_DOWNLOAD, path.Join(prefix, repos, path.Join(arg[2:]...)))
|
||||
}},
|
||||
"/local/": {Name: "/space/", Help: "空间站", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
p := path.Join(cmd)
|
||||
|
@ -270,7 +270,7 @@ var Index = &ice.Context{Name: "git", Help: "代码库",
|
||||
}},
|
||||
|
||||
"trend": {Name: "trend name=auto begin_time=@date auto", Help: "趋势图", Meta: kit.Dict(
|
||||
"display", "/plugin/story/trend",
|
||||
"display", "story/trend",
|
||||
), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
m.Option("_display", "table")
|
||||
|
Loading…
x
Reference in New Issue
Block a user