forked from x/icebergs
opt some
This commit is contained in:
parent
ab94f662b8
commit
bd4f17865d
@ -84,7 +84,14 @@ func init() {
|
|||||||
ice.CONTEXTS: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, arg...) }},
|
ice.CONTEXTS: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, arg...) }},
|
||||||
nfs.SOURCE: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, nfs.SOURCE) }},
|
nfs.SOURCE: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, nfs.SOURCE) }},
|
||||||
nfs.BINARY: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, nfs.BINARY) }},
|
nfs.BINARY: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, nfs.BINARY) }},
|
||||||
"manual": {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, "manual") }},
|
"manual": {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
host := web.UserHost(m)
|
||||||
|
m.Cmdy("web.wiki.spark", "shell",
|
||||||
|
cli.LINUX, kit.Format(`curl -fSL -O %s/publish/ice.linux.amd64`, host),
|
||||||
|
cli.DARWIN, kit.Format(`curl -fSL -O %s/publish/ice.darwin.amd64`, host),
|
||||||
|
cli.WINDOWS, kit.Format(`curl -fSL -O %s/publish/ice.windows.amd64`, host),
|
||||||
|
)
|
||||||
|
}},
|
||||||
"wget": {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, "wget") }},
|
"wget": {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, "wget") }},
|
||||||
"curl": {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, "curl") }},
|
"curl": {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, "curl") }},
|
||||||
"version": {Hand: func(m *ice.Message, arg ...string) {
|
"version": {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
4
init.go
4
init.go
@ -80,10 +80,12 @@ func Run(arg ...string) string {
|
|||||||
kit.If(len(arg) == 0 && len(os.Args) > 1, func() { arg = kit.Simple(os.Args[1:], kit.Split(kit.Env(CTX_ARG))) })
|
kit.If(len(arg) == 0 && len(os.Args) > 1, func() { arg = kit.Simple(os.Args[1:], kit.Split(kit.Env(CTX_ARG))) })
|
||||||
if len(arg) == 0 {
|
if len(arg) == 0 {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
arg = append(arg, SERVE, START, DEV, DEV)
|
arg = append(arg, SERVE, START)
|
||||||
} else {
|
} else {
|
||||||
arg = append(arg, FOREVER, START)
|
arg = append(arg, FOREVER, START)
|
||||||
}
|
}
|
||||||
|
} else if arg[0] == FOREVER && runtime.GOOS == "windows" {
|
||||||
|
arg[0] = SERVE
|
||||||
}
|
}
|
||||||
Pulse.meta[MSG_DETAIL] = arg
|
Pulse.meta[MSG_DETAIL] = arg
|
||||||
kit.For(kit.Sort(os.Environ()), func(env string) {
|
kit.For(kit.Sort(os.Environ()), func(env string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user