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-17 15:08:52 +08:00
parent aa2e020629
commit b3a0cb60e4
2 changed files with 20 additions and 7 deletions

View File

@ -115,15 +115,25 @@ func init() {
} }
var _contexts = kit.Dict( var _contexts = kit.Dict(
ice.MISC, `# 下载命令 curl wget ice.MISC, `
export ctx_dev={{.Option "httphost"}}{{.Option "ctx_env"}}; ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL $ctx_dev; source $ctx_temp app username {{.Option "user.name"}} usernick {{.Option "user.nick"}} # 下载工具 wget Alpine
export ctx_dev={{.Option "httphost"}}{{.Option "ctx_env"}}; ctx_temp=$(mktemp); wget -O $ctx_temp -q $ctx_dev; source $ctx_temp app username {{.Option "user.name"}} usernick {{.Option "user.nick"}} export ctx_dev={{.Option "httphost"}}{{.Option "ctx_env"}}; ctx_temp=$(mktemp); wget -O $ctx_temp -q $ctx_dev; source $ctx_temp app username {{.Option "user.name"}} usernick {{.Option "user.nick"}}
# 下载工具 curl Centos / MacOS
export ctx_dev={{.Option "httphost"}}{{.Option "ctx_env"}}; ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL $ctx_dev; source $ctx_temp app username {{.Option "user.name"}} usernick {{.Option "user.nick"}}
`, `,
ice.CORE, `# 下载工具 curl wget ice.CORE, `
ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL {{.Cmdx "spide" "shy" "client.url"}}; source $ctx_temp binary # 下载命令 wget Alpine
ctx_temp=$(mktemp); wget -O $ctx_temp -q {{.Cmdx "spide" "shy" "client.url"}}; source $ctx_temp binary ctx_temp=$(mktemp); wget -O $ctx_temp -q {{.Cmdx "spide" "shy" "client.url"}}; source $ctx_temp binary
# 下载命令 curl Centos / MacOS
ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL {{.Cmdx "spide" "shy" "client.url"}}; source $ctx_temp binary
`, `,
ice.BASE, `# 下载源码 ice.BASE, `
git clone {{.Option "remote"}}; cd {{.Option "pathname"}} && source etc/miss.sh # 下载源码 wget Alpine
ctx_temp=$(mktemp); wget -O $ctx_temp -q {{.Cmdx "spide" "shy" "client.url"}}; source $ctx_temp source
# 下载源码 curl Centos / MacOS
ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL {{.Cmdx "spide" "shy" "client.url"}}; source $ctx_temp source
`, `,
) )

View File

@ -132,7 +132,7 @@ func init() {
_repos_cat(m, dir, arg[1], arg[2], kit.Select("", arg, 3)) _repos_cat(m, dir, arg[1], arg[2], kit.Select("", arg, 3))
} }
}}, }},
SERVER: {Name: "server repos branch commit path auto create import", Help: "服务器", Actions: ice.MergeActions(ice.Actions{ SERVER: {Name: "server repos branch commit path auto clone create import", Help: "服务器", Actions: ice.MergeActions(ice.Actions{
mdb.CREATE: {Name: "create name*", Hand: func(m *ice.Message, arg ...string) { mdb.CREATE: {Name: "create name*", Hand: func(m *ice.Message, arg ...string) {
_repos_init(m, path.Join(ice.USR_LOCAL_REPOS, m.Option(mdb.NAME))) _repos_init(m, path.Join(ice.USR_LOCAL_REPOS, m.Option(mdb.NAME)))
}}, }},
@ -154,6 +154,9 @@ func init() {
m.Cmd("", func(value ice.Maps) { m.Push(nfs.PATH, _git_url(m, value[nfs.PATH])) }) m.Cmd("", func(value ice.Maps) { m.Push(nfs.PATH, _git_url(m, value[nfs.PATH])) })
} }
}}, }},
"clone": {Help: "克隆", Hand: func(m *ice.Message, arg ...string) {
m.EchoScript("git clone https://shylinux.com/x/contexts && cd contexts && source etc/miss.sh")
}},
"inner": {Help: "编辑器", Hand: func(m *ice.Message, arg ...string) { "inner": {Help: "编辑器", Hand: func(m *ice.Message, arg ...string) {
if len(arg) == 0 || arg[0] != ice.RUN { if len(arg) == 0 || arg[0] != ice.RUN {
arg = []string{path.Join(ice.USR_LOCAL_REPOS, arg[0]), kit.Select("README.md", arg, 3)} arg = []string{path.Join(ice.USR_LOCAL_REPOS, arg[0]), kit.Select("README.md", arg, 3)}