mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-26 01:04:06 +08:00
add env
This commit is contained in:
parent
558afd9202
commit
1a708f792f
12
bin/ice.sh
12
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 $*
|
||||
|
25
src/main.shy
25
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user