mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
a5632542c3
commit
c81efa1b05
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@ src/binpack.go
|
||||
src/version.go
|
||||
etc/local.shy
|
||||
etc/local.sh
|
||||
etc/path
|
||||
*.swp
|
||||
*.swo
|
||||
bin/
|
||||
|
26
bin/ice.sh
26
bin/ice.sh
@ -2,36 +2,16 @@
|
||||
|
||||
export ctx_log=${ctx_log:=bin/boot.log}
|
||||
export ctx_pid=${ctx_pid:=var/run/ice.pid}
|
||||
export ctx_mod=${ctx_mod:=gdb,log,ssh,ctx}
|
||||
|
||||
prepare() {
|
||||
[ -d bin ] || mkdir bin
|
||||
[ -e bin/ice.sh ] || (curl -o bin/ice.sh -fsSL $ctx_dev/publish/ice.sh || wget -O bin/ice.sh $ctx_dev/publish/ice.sh) && chmod u+x bin/ice.sh
|
||||
[ -e bin/ice.bin ] && chmod u+x bin/ice.bin && return
|
||||
|
||||
bin="ice"
|
||||
case `uname -s` in
|
||||
Darwin) bin=${bin}.darwin ;;
|
||||
Linux) bin=${bin}.linux ;;
|
||||
*) bin=${bin}.windows ;;
|
||||
esac
|
||||
case `uname -m` in
|
||||
x86_64) bin=${bin}.amd64 ;;
|
||||
arm*) bin=${bin}.arm ;;
|
||||
*) bin=${bin}.386 ;;
|
||||
esac
|
||||
(curl -o bin/ice.bin -fsSL $ctx_dev/publish/${bin} || wget -O bin/ice.bin $ctx_dev/publish/${bin}) && chmod u+x bin/ice.bin
|
||||
}
|
||||
|
||||
restart() {
|
||||
[ -e $ctx_pid ] && kill -2 `cat $ctx_pid` &>/dev/null || echo
|
||||
}
|
||||
start() {
|
||||
prepare
|
||||
trap HUP hup && while true; do
|
||||
date && bin/ice.bin $@ 2>$ctx_log && break || echo -e \"\n\nrestarting...\"
|
||||
done
|
||||
}
|
||||
restart() {
|
||||
[ -e $ctx_pid ] && kill -2 `cat $ctx_pid` &>/dev/null || echo
|
||||
}
|
||||
stop() {
|
||||
[ -e $ctx_pid ] && kill -3 `cat $ctx_pid` &>/dev/null || echo
|
||||
}
|
||||
|
@ -7,7 +7,11 @@ ish_sys_cli_prompt
|
||||
ish_sys_cli_alias vi vim
|
||||
ish_sys_cli_alias t "tmux attach"
|
||||
ish_sys_path_insert $CTX_ROOT/usr/publish
|
||||
ish_sys_path_insert $CTX_ROOT/usr/install/vim81/_install/bin
|
||||
|
||||
for line in `cat $CTX_ROOT/etc/path`; do
|
||||
ish_sys_path_insert $line
|
||||
ish_log_debug "path" $line
|
||||
done
|
||||
|
||||
ps aux |grep -v grep |grep ice.bin &>/dev/null && return
|
||||
ps aux |grep -v grep |grep tmux &>/dev/null && return
|
||||
|
29
go.mod
29
go.mod
@ -12,21 +12,20 @@ require (
|
||||
|
||||
require (
|
||||
shylinux.com/x/ice v0.2.0
|
||||
shylinux.com/x/icebergs v0.4.8
|
||||
shylinux.com/x/icebergs v0.4.9
|
||||
shylinux.com/x/toolkits v0.3.2
|
||||
)
|
||||
|
||||
// replace (
|
||||
// shylinux.com/x/golang-story => ./usr/golang-story
|
||||
// shylinux.com/x/linux-story => ./usr/linux-story
|
||||
// shylinux.com/x/mysql-story => ./usr/mysql-story
|
||||
// shylinux.com/x/nginx-story => ./usr/nginx-story
|
||||
// shylinux.com/x/redis-story => ./usr/redis-story
|
||||
// )
|
||||
//
|
||||
// replace (
|
||||
// shylinux.com/x/ice => ./usr/release
|
||||
// shylinux.com/x/icebergs => ./usr/icebergs
|
||||
// shylinux.com/x/toolkits => ./usr/toolkits
|
||||
// )
|
||||
//
|
||||
replace (
|
||||
shylinux.com/x/golang-story => ./usr/golang-story
|
||||
shylinux.com/x/linux-story => ./usr/linux-story
|
||||
shylinux.com/x/mysql-story => ./usr/mysql-story
|
||||
shylinux.com/x/nginx-story => ./usr/nginx-story
|
||||
shylinux.com/x/redis-story => ./usr/redis-story
|
||||
)
|
||||
|
||||
replace (
|
||||
shylinux.com/x/ice => ./usr/release
|
||||
shylinux.com/x/icebergs => ./usr/icebergs
|
||||
shylinux.com/x/toolkits => ./usr/toolkits
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user