mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
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
|
||||
usr/install/qemu-3.1.0/_install/bin
|
||||
usr/install/ctags-5.8/_install/bin
|
||||
usr/install/gcc-4.8.4/_install/bin
|
||||
usr/install/gdb-7.6.1/_install/bin
|
||||
bin
|
||||
usr/publish
|
||||
usr/local/bin
|
||||
usr/local/go/bin
|
||||
usr/local/work/20221205-sshd/usr/publish
|
||||
usr/install/bash-5.1/_install/bin
|
||||
usr/install/tmux-3.2/_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/jdk-18/bin
|
||||
usr/install/docker
|
||||
usr/local/work/20221205-sshd/usr/publish
|
||||
usr/local/go/bin
|
||||
usr/local/bin
|
||||
usr/publish
|
||||
bin
|
||||
usr/install/ctags-5.8/_install/bin
|
||||
usr/install/gcc-4.8.4/_install/bin
|
||||
usr/install/gdb-7.6.1/_install/bin
|
||||
usr/install/qemu-3.1.0/_install/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.Echo("hello world\n"+(can.Conf("content")||""))
|
||||
can.require(["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(["https://shylinux.com/x/contexts@v2.9.2/src/hi/he.js?content=what"], 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(["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 "hello world"
|
||||
}
|
||||
echo "$ISH_CTX_SCRIPT <= $ISH_CTX_MODULE"
|
||||
echo "$TERM $PWD $HOME $PATH"
|
||||
echo "hello world $content $@"
|
||||
|
||||
require "he.sh"
|
||||
require "/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.sh"
|
||||
require "http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/he.sh"
|
||||
require "https://shylinux.com/x/contexts@v2.9.2/src/hi/he.sh?content=what"
|
||||
|
||||
show
|
||||
_list
|
||||
echo
|
||||
|
||||
_list hi
|
||||
echo
|
||||
|
||||
_list hi 1
|
||||
echo
|
||||
|
||||
echo "hello world"
|
||||
require "he.sh?content=what" nice
|
||||
require "/require/shylinux.com/x/contexts@v2.9.3/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.3/src/hi/he.sh?content=what"
|
||||
|
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() {
|
||||
case "$1" in
|
||||
app) # 生产环境
|
||||
@ -8,12 +27,11 @@ main() {
|
||||
shift && prepare_package && source etc/miss.sh "$@"
|
||||
;;
|
||||
cmd) # 命令环境
|
||||
ish_sys_dev_init >/dev/null
|
||||
shift; [ -n "$*" ] && ish_sys_dev_run "$@"
|
||||
ish_sys_dev_init >/dev/null; shift; [ -n "$*" ] && ish_sys_dev_run "$@"
|
||||
;;
|
||||
*)
|
||||
require src/hi/hi.sh
|
||||
;;
|
||||
esac
|
||||
}
|
||||
main "$@"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user