forked from x/ContextOS
opt some
This commit is contained in:
parent
689dd69894
commit
b19fc4fc58
21
etc/path
21
etc/path
@ -1,8 +1,8 @@
|
|||||||
usr/install/ffmpeg-4.2.1/_install/bin
|
bin
|
||||||
usr/install/qemu-3.1.0/_install/bin
|
usr/publish
|
||||||
usr/install/ctags-5.8/_install/bin
|
usr/local/bin
|
||||||
usr/install/gcc-4.8.4/_install/bin
|
usr/local/go/bin
|
||||||
usr/install/gdb-7.6.1/_install/bin
|
usr/local/work/20221205-sshd/usr/publish
|
||||||
usr/install/bash-5.1/_install/bin
|
usr/install/bash-5.1/_install/bin
|
||||||
usr/install/tmux-3.2/_install/bin
|
usr/install/tmux-3.2/_install/bin
|
||||||
usr/install/git-2.31.1/_install/bin
|
usr/install/git-2.31.1/_install/bin
|
||||||
@ -12,8 +12,9 @@ usr/install/node-v16.15.1-darwin-x64/bin
|
|||||||
usr/install/node-v16.15.1-linux-x64/bin
|
usr/install/node-v16.15.1-linux-x64/bin
|
||||||
usr/install/jdk-18/bin
|
usr/install/jdk-18/bin
|
||||||
usr/install/docker
|
usr/install/docker
|
||||||
usr/local/work/20221205-sshd/usr/publish
|
usr/install/ctags-5.8/_install/bin
|
||||||
usr/local/go/bin
|
usr/install/gcc-4.8.4/_install/bin
|
||||||
usr/local/bin
|
usr/install/gdb-7.6.1/_install/bin
|
||||||
usr/publish
|
usr/install/qemu-3.1.0/_install/bin
|
||||||
bin
|
usr/install/ffmpeg-4.2.1/_install/bin
|
||||||
|
|
||||||
|
7
hi.sh
Normal file
7
hi.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
export ctx_dev=http://192.168.10.8:9020 ctx_pod= ctx_mod=web.code.hi.hi
|
||||||
|
temp=$(mktemp); if curl -h &>/dev/null; then
|
||||||
|
curl -o $temp -fsSL $ctx_dev
|
||||||
|
else
|
||||||
|
wget -O $temp -q $ctx_dev
|
||||||
|
fi && source $temp $ctx_mod
|
9
src/hi/he.sh
Normal file → Executable file
9
src/hi/he.sh
Normal file → Executable file
@ -1 +1,8 @@
|
|||||||
echo "hello world"
|
#!/bin/sh
|
||||||
|
|
||||||
|
show() {
|
||||||
|
echo "$TERM $PWD $HOME $PATH"
|
||||||
|
echo "$ISH_CTX_SCRIPT <= $ISH_CTX_MODULE"
|
||||||
|
echo "hello world $content $@"
|
||||||
|
}
|
||||||
|
show
|
||||||
|
@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
|
|||||||
msg.Defer(function() { msg.Dump() })
|
msg.Defer(function() { msg.Dump() })
|
||||||
msg.Echo("hello world\n"+(can.Conf("content")||""))
|
msg.Echo("hello world\n"+(can.Conf("content")||""))
|
||||||
can.require(["he.js"], function() { }, function() { })
|
can.require(["he.js"], function() { }, function() { })
|
||||||
can.require(["/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.js"], function() { }, function() { })
|
// can.require(["/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.js"], function() { }, function() { })
|
||||||
can.require(["http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.js"], function() { }, function() { })
|
// can.require(["http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.js"], function() { }, function() { })
|
||||||
can.require(["https://shylinux.com/x/contexts@v2.9.2/src/hi/he.js?content=what"], function() { }, function() { })
|
// can.require(["https://shylinux.com/x/contexts@v2.9.2/src/hi/he.js?content=what"], function() { }, function() { })
|
||||||
}})
|
}})
|
||||||
|
28
src/hi/hi.sh
28
src/hi/hi.sh
@ -1,22 +1,10 @@
|
|||||||
#! /bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
function show() {
|
echo "$ISH_CTX_SCRIPT <= $ISH_CTX_MODULE"
|
||||||
echo "hello world"
|
echo "$TERM $PWD $HOME $PATH"
|
||||||
}
|
echo "hello world $content $@"
|
||||||
|
|
||||||
require "he.sh"
|
require "he.sh?content=what" nice
|
||||||
require "/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.sh"
|
require "/require/shylinux.com/x/contexts@v2.9.3/src/hi/he.sh"
|
||||||
require "http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.sh"
|
require "http://192.168.10.8:9020/require/shylinux.com/x/contexts@v2.9.3/src/hi/he.sh"
|
||||||
require "https://shylinux.com/x/contexts@v2.9.2/src/hi/he.sh?content=what"
|
# require "https://shylinux.com/x/contexts@v2.9.3/src/hi/he.sh?content=what"
|
||||||
|
|
||||||
show
|
|
||||||
_list
|
|
||||||
echo
|
|
||||||
|
|
||||||
_list hi
|
|
||||||
echo
|
|
||||||
|
|
||||||
_list hi 1
|
|
||||||
echo
|
|
||||||
|
|
||||||
echo "hello world"
|
|
||||||
|
24
src/main.sh
24
src/main.sh
@ -1,3 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
_down_tar() { # 下载文件 file path
|
||||||
|
[ -f $1 ] && return; _down_big_file "$@" && tar -xf $1
|
||||||
|
}
|
||||||
|
_down_tars() { # 下载文件 file...
|
||||||
|
for file in "$@"; do _down_tar $file publish/$file; done
|
||||||
|
}
|
||||||
|
prepare_package() {
|
||||||
|
_down_tars contexts.bin.tar.gz contexts.src.tar.gz
|
||||||
|
local back=$PWD; cd ~/; _down_tars contexts.home.tar.gz; cd $back
|
||||||
|
export VIM=$PWD/usr/install/vim-vim-12be734/_install/share/vim/vim82/
|
||||||
|
export LD_LIBRARY_PATH=$PWD/usr/local/lib
|
||||||
|
|
||||||
|
ish_sys_path_load
|
||||||
|
git config --global init.templatedir $PWD/usr/install/git-2.31.1/_install/share/git-core/templates/
|
||||||
|
git config --global url."$ctx_dev".insteadOf https://shylinux.com
|
||||||
|
git config --global init.defaultBranch master
|
||||||
|
}
|
||||||
main() {
|
main() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
app) # 生产环境
|
app) # 生产环境
|
||||||
@ -8,12 +27,11 @@ main() {
|
|||||||
shift && prepare_package && source etc/miss.sh "$@"
|
shift && prepare_package && source etc/miss.sh "$@"
|
||||||
;;
|
;;
|
||||||
cmd) # 命令环境
|
cmd) # 命令环境
|
||||||
ish_sys_dev_init >/dev/null
|
ish_sys_dev_init >/dev/null; shift; [ -n "$*" ] && ish_sys_dev_run "$@"
|
||||||
shift; [ -n "$*" ] && ish_sys_dev_run "$@"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
require src/hi/hi.sh
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user