diff --git a/core/code/publish.go b/core/code/publish.go index 3f7f02ee..e5ae6053 100644 --- a/core/code/publish.go +++ b/core/code/publish.go @@ -115,15 +115,25 @@ func init() { } var _contexts = kit.Dict( - ice.MISC, `# 下载命令 curl 或 wget -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.MISC, ` +# 下载工具 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"}} + +# 下载工具 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 -ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL {{.Cmdx "spide" "shy" "client.url"}}; source $ctx_temp binary + ice.CORE, ` +# 下载命令 wget Alpine 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, `# 下载源码 -git clone {{.Option "remote"}}; cd {{.Option "pathname"}} && source etc/miss.sh + ice.BASE, ` +# 下载源码 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 `, ) diff --git a/misc/git/server.go b/misc/git/server.go index 91a1281e..dc323f98 100644 --- a/misc/git/server.go +++ b/misc/git/server.go @@ -132,7 +132,7 @@ func init() { _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) { _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])) }) } }}, + "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) { if len(arg) == 0 || arg[0] != ice.RUN { arg = []string{path.Join(ice.USR_LOCAL_REPOS, arg[0]), kit.Select("README.md", arg, 3)}