1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
shylinux 2023-02-20 19:42:40 +08:00
parent d48225bfe6
commit cf36511cc5
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ func init() {
mdb.RENDER: {Hand: func(m *ice.Message, arg ...string) {
cmds, text := SH, kit.Format(_sh_template, m.Option(ice.MSG_USERHOST), m.Option(ice.MSG_USERPOD), path.Join(arg[2], arg[1]))
if strings.HasPrefix(text, "#!") {
cmds = strings.TrimSpace(strings.SplitN(text, ice.NL, 2)[0][2:])
// cmds = strings.TrimSpace(strings.SplitN(text, ice.NL, 2)[0][2:])
}
_xterm_show(m, cmds, text)
}},
@ -37,5 +37,5 @@ func init() {
var _sh_template = `#!/bin/sh
export ctx_dev=%s ctx_pod=%s ctx_mod=%s
temp=$(mktemp); if curl -h &>/dev/null; then curl -o $temp -fsSL $ctx_dev; else wget -O $temp -q $ctx_dev; fi && source $temp $ctx_mod
temp=$(mktemp); if curl -V &>/dev/null; then curl -o $temp -fsSL $ctx_dev; else wget -O $temp -q $ctx_dev; fi && source $temp $ctx_mod
`

View File

@ -93,7 +93,7 @@ const SERVER = "server"
func init() {
web.Index.MergeCommands(ice.Commands{"/x/": {Actions: ice.MergeActions(ctx.CmdAction(), aaa.WhiteAction(ctx.COMMAND, ice.RUN)), Hand: func(m *ice.Message, arg ...string) {
if !m.IsCliUA() {
if !m.IsCliUA() || strings.Contains(arg[0], ice.AT) {
if strings.Contains(arg[0], ice.AT) {
ls := strings.Split(arg[0], ice.AT)
_repos_cat(m, path.Join(ice.USR_LOCAL_REPOS, ls[0]), "master", ls[1], path.Join(arg[1:]...))