mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
opt some
This commit is contained in:
parent
841ff5ef0b
commit
dd595a3a89
@ -98,7 +98,7 @@ require miss.sh
|
||||
},
|
||||
Commands: map[string]*ice.Command{
|
||||
DREAM: {Name: "dream [name [cmd...]] auto", Help: "梦想家", Meta: kit.Dict("detail", []interface{}{"启动", "停止"}), Action: map[string]*ice.Action{
|
||||
gdb.START: {Name: "start", Help: "启动", Hand: func(m *ice.Message, arg ...string) {
|
||||
gdb.START: {Name: "start type name", Help: "启动", Hand: func(m *ice.Message, arg ...string) {
|
||||
_dream_show(m, m.Option(kit.MDB_NAME))
|
||||
}},
|
||||
gdb.STOP: {Name: "stop", Help: "停止", Hand: func(m *ice.Message, arg ...string) {
|
||||
|
@ -50,6 +50,7 @@ var Index = &ice.Context{Name: "code", Help: "编程中心",
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Load()
|
||||
m.Cmd(mdb.ENGINE, mdb.CREATE, BENCH)
|
||||
m.Conf(INSTALL, "meta.contexts", _contexts)
|
||||
}},
|
||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Save(INSTALL)
|
||||
|
@ -16,15 +16,19 @@ import (
|
||||
)
|
||||
|
||||
var _contexts = kit.Dict(
|
||||
"tmux", `yum install -y tmux
|
||||
curl -o tmux.conf {{.Option "httphost"}}/publish/tmux.conf
|
||||
tmux -f tmux.conf`,
|
||||
"base", `mkdir contexts; cd contexts
|
||||
"tmux", `
|
||||
# 终端环境
|
||||
curl -fLo /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo && yum -y update
|
||||
yum install -y tmux vim
|
||||
`,
|
||||
"base", `
|
||||
# 生产环境
|
||||
mkdir contexts; cd contexts
|
||||
export ctx_dev={{.Option "httphost"}} ctx_log=/dev/stdout; curl $ctx_dev/publish/ice.sh |sh
|
||||
export ctx_dev={{.Option "httphost"}} ctx_log=/dev/stdout; wget -O - $ctx_dev/publish/ice.sh | sh
|
||||
bin/ice.sh`,
|
||||
"miss", `
|
||||
yum install -y git vim make go
|
||||
# 开发环境
|
||||
yum install -y make git go
|
||||
mkdir ~/.ssh &>/dev/null; touch ~/.ssh/config; [ -z "$(cat ~/.ssh/config|grep 'HOST {{.Option "hostname"}}')" ] && echo -e "HOST {{.Option "hostname"}}\n Port 9030" >> ~/.ssh/config
|
||||
export ISH_CONF_HUB_PROXY={{.Option "userhost"}}:.ish/pluged/
|
||||
git clone $ISH_CONF_HUB_PROXY/github.com/shylinux/contexts && cd contexts
|
||||
|
Loading…
x
Reference in New Issue
Block a user