From 1a708f792f7bd4577567e523a2a976f89ac09ab1 Mon Sep 17 00:00:00 2001 From: shylinux Date: Sun, 6 Sep 2020 12:11:52 +0800 Subject: [PATCH] add env --- bin/ice.sh | 12 +++++++----- src/main.shy | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/bin/ice.sh b/bin/ice.sh index 667a3d53..e2e3faa0 100755 --- a/bin/ice.sh +++ b/bin/ice.sh @@ -1,9 +1,10 @@ #! /bin/sh export PATH=${PWD}/bin:${PWD}:$PATH +export ctx_dev=${ctx_dev:="https://shylinux.com:443"} +export ctx_mod=${ctx_mod:="gdb,log,ssh,ctx"} export ctx_pid=${ctx_pid:=var/run/ice.pid} export ctx_log=${ctx_log:=bin/boot.log} -export ctx_mod=${ctx_mod:="gdb,log,ssh,ctx"} prepare() { [ -d bin ] || mkdir bin @@ -20,14 +21,16 @@ prepare() { esac case `uname -m` in x86_64) bin=${bin}.amd64 ;; - i686) bin=${bin}.386 ;; arm*) bin=${bin}.arm ;; + *) bin=${bin}.386 ;; esac curl -sq $ctx_dev/publish/${bin} -o bin/ice.bin && chmod u+x bin/ice.bin } start() { trap HUP hup && while true; do - date && ice.bin $@ 2>$ctx_log && echo -e "\n\nrestarting..." && break + date && echo -e "\n\nrestarting..." + echo -e "ctx_dev: $ctx_dev ctx_mod: $ctx_mod ctx_cmd: $ctx_cmd" + ice.bin $@ 2>$ctx_log && break done } restart() { @@ -40,5 +43,4 @@ serve() { prepare && shutdown && start $@ } -cmd=$1 && [ -n "$cmd" ] && shift || cmd=prepare -$cmd $* +cmd=$1 && [ -n "$cmd" ] && shift || cmd="serve serve dev"; $cmd $* diff --git a/src/main.shy b/src/main.shy index 922a2b7c..292c07e2 100644 --- a/src/main.shy +++ b/src/main.shy @@ -20,6 +20,31 @@ volcanos icebergs intshell learning toolkits contexts ` stroke red fill black +chapter "环境" +field "安装管理" web.code.install +field "发布管理" web.code.publish + +section "终端环境" +web.code.install contexts tmux centos +web.code.install contexts tmux ubuntu +web.code.install contexts tmux alpine +web.code.install contexts tmux darwin + +section "生产环境" +web.code.install contexts base centos +web.code.install contexts base ubuntu +web.code.install contexts base alpine +web.code.install contexts base darwin + +section "开发环境" +web.code.install contexts miss centos +web.code.install contexts miss ubuntu +web.code.install contexts miss alpine +web.code.install contexts miss darwin + +chapter "组织" +chapter "品牌" + chapter "管理" field "下载管理" web.code.install field "服务管理" cli.daemon