1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-26 01:04:06 +08:00
This commit is contained in:
shylinux 2020-09-06 12:11:52 +08:00
parent 558afd9202
commit 1a708f792f
2 changed files with 32 additions and 5 deletions

View File

@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
export PATH=${PWD}/bin:${PWD}:$PATH 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_pid=${ctx_pid:=var/run/ice.pid}
export ctx_log=${ctx_log:=bin/boot.log} export ctx_log=${ctx_log:=bin/boot.log}
export ctx_mod=${ctx_mod:="gdb,log,ssh,ctx"}
prepare() { prepare() {
[ -d bin ] || mkdir bin [ -d bin ] || mkdir bin
@ -20,14 +21,16 @@ prepare() {
esac esac
case `uname -m` in case `uname -m` in
x86_64) bin=${bin}.amd64 ;; x86_64) bin=${bin}.amd64 ;;
i686) bin=${bin}.386 ;;
arm*) bin=${bin}.arm ;; arm*) bin=${bin}.arm ;;
*) bin=${bin}.386 ;;
esac esac
curl -sq $ctx_dev/publish/${bin} -o bin/ice.bin && chmod u+x bin/ice.bin curl -sq $ctx_dev/publish/${bin} -o bin/ice.bin && chmod u+x bin/ice.bin
} }
start() { start() {
trap HUP hup && while true; do 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 done
} }
restart() { restart() {
@ -40,5 +43,4 @@ serve() {
prepare && shutdown && start $@ prepare && shutdown && start $@
} }
cmd=$1 && [ -n "$cmd" ] && shift || cmd=prepare cmd=$1 && [ -n "$cmd" ] && shift || cmd="serve serve dev"; $cmd $*
$cmd $*

View File

@ -20,6 +20,31 @@ volcanos icebergs intshell
learning toolkits contexts learning toolkits contexts
` stroke red fill black ` 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 "管理" chapter "管理"
field "下载管理" web.code.install field "下载管理" web.code.install
field "服务管理" cli.daemon field "服务管理" cli.daemon