forked from x/icebergs
opt some
This commit is contained in:
parent
3cf004299e
commit
f98cf8c113
@ -56,9 +56,15 @@ func _website_parse(m *ice.Message, text string, args ...string) (map[string]int
|
|||||||
case nfs.GO:
|
case nfs.GO:
|
||||||
ls[0] = ice.GetFileCmd(ls[0])
|
ls[0] = ice.GetFileCmd(ls[0])
|
||||||
|
|
||||||
|
case nfs.SH:
|
||||||
|
ls[0], data[ctx.ARGS] = "web.code.sh.sh", ls[0]
|
||||||
|
|
||||||
case nfs.SHY:
|
case nfs.SHY:
|
||||||
ls[0], data[ctx.ARGS] = "web.wiki.word", ls[0]
|
ls[0], data[ctx.ARGS] = "web.wiki.word", ls[0]
|
||||||
|
|
||||||
|
case nfs.PY:
|
||||||
|
ls[0], data[ctx.ARGS] = "web.code.sh.py", ls[0]
|
||||||
|
|
||||||
case "~":
|
case "~":
|
||||||
prefix = ls[1]
|
prefix = ls[1]
|
||||||
ls = ls[1:]
|
ls = ls[1:]
|
||||||
|
@ -13,11 +13,20 @@ import (
|
|||||||
func _sh_main_script(m *ice.Message, arg ...string) (res []string) {
|
func _sh_main_script(m *ice.Message, arg ...string) (res []string) {
|
||||||
if cmd := ice.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
if cmd := ice.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
||||||
res = append(res, kit.Format(`#! /bin/sh
|
res = append(res, kit.Format(`#! /bin/sh
|
||||||
export ctx_dev=%s; ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp %s &>/dev/null
|
export ctx_dev=%s; ctx_pod=%s ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp &>/dev/null
|
||||||
|
_done=""
|
||||||
_list() {
|
_list() {
|
||||||
|
if [ "$_done" = "" ]; then
|
||||||
|
ish_sys_dev_run %s "$@"
|
||||||
|
else
|
||||||
ish_sys_dev_run_command "$@"
|
ish_sys_dev_run_command "$@"
|
||||||
|
fi
|
||||||
|
_done=done
|
||||||
}
|
}
|
||||||
`, "http://localhost:9020", cmd))
|
_action() {
|
||||||
|
_list action "$@"
|
||||||
|
}
|
||||||
|
`, "http://localhost:9020", m.Option(ice.MSG_USERPOD), cmd))
|
||||||
}
|
}
|
||||||
|
|
||||||
if kit.FileExists(kit.Path(arg[2], arg[1])) {
|
if kit.FileExists(kit.Path(arg[2], arg[1])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user