mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
opt module
This commit is contained in:
parent
746beb6247
commit
bc8eba229d
11
src/demo.go
Normal file
11
src/demo.go
Normal file
@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("hello world")
|
||||
fmt.Println("hello world")
|
||||
fmt.Println("hello world")
|
||||
fmt.Println("hello world")
|
||||
fmt.Println("hello world")
|
||||
}
|
5
src/h2/h2.c
Normal file
5
src/h2/h2.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
printf("hello world\n");
|
||||
}
|
3
src/h2/h2.css
Normal file
3
src/h2/h2.css
Normal file
@ -0,0 +1,3 @@
|
||||
body fieldset.web.code.h2.h2 div.output {
|
||||
background-color:gray;
|
||||
}
|
@ -6,15 +6,10 @@ import (
|
||||
|
||||
type h2 struct {
|
||||
ice.Zone
|
||||
|
||||
list string `name:"list zone id auto insert show" help:"示例"`
|
||||
}
|
||||
|
||||
func (s h2) Show(m *ice.Message, arg ...string) {
|
||||
m.Echo("hello world")
|
||||
}
|
||||
func (s h2) List(m *ice.Message, arg ...string) {
|
||||
s.Zone.List(m, arg...)
|
||||
}
|
||||
func (s h2) Show(m *ice.Message, arg ...string) { m.Echo("hello world") }
|
||||
func (s h2) List(m *ice.Message, arg ...string) { s.Zone.List(m, arg...) }
|
||||
|
||||
func init() { ice.Cmd("web.code.h2.h2", h2{}) }
|
||||
|
9
src/h2/h2.html
Normal file
9
src/h2/h2.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8"><title>volcanos</title>
|
||||
<link href="/publish/can.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<script src="/publish/can.js"></script>
|
||||
<script>Volcanos([{"index":"web.code.h2.h2","display":"src/h2/h2.js"}])</script>
|
||||
</body>
|
3
src/h2/h2.js
Normal file
3
src/h2/h2.js
Normal file
@ -0,0 +1,3 @@
|
||||
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
|
||||
msg.Echo("hello world").Dump(can)
|
||||
}})
|
1
src/h2/h2.py
Normal file
1
src/h2/h2.py
Normal file
@ -0,0 +1 @@
|
||||
print "hello world"
|
@ -1,6 +1,5 @@
|
||||
chapter "h2"
|
||||
|
||||
|
||||
field web.code.h2.h2
|
||||
spark "hello world"
|
||||
shell `
|
||||
|
@ -3,3 +3,4 @@
|
||||
demo1() {
|
||||
echo "hello world"
|
||||
}
|
||||
demo1
|
||||
|
@ -26,7 +26,8 @@ import (
|
||||
_ "shylinux.com/x/linux-story/src/busybox"
|
||||
_ "shylinux.com/x/linux-story/src/ctags"
|
||||
_ "shylinux.com/x/linux-story/src/ffmpeg"
|
||||
_ "shylinux.com/x/linux-story/src/gcc"
|
||||
|
||||
// _ "shylinux.com/x/linux-story/src/gcc"
|
||||
_ "shylinux.com/x/linux-story/src/gdb"
|
||||
_ "shylinux.com/x/linux-story/src/glibc"
|
||||
_ "shylinux.com/x/linux-story/src/kernel"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
require "shylinux.com/x/contexts/src/h2/h2.sh"
|
||||
# require "shylinux.com/x/contexts/src/h2/h2.sh"
|
||||
|
||||
main() {
|
||||
case "$1" in
|
||||
@ -19,7 +19,8 @@ main() {
|
||||
ish_sys_dev_init >/dev/null; shift; [ -n "$*" ] && ish_sys_dev_run "$@"
|
||||
;;
|
||||
*)
|
||||
require src/hi/hi.sh
|
||||
# require src/hi/hi.sh
|
||||
echo "hello world"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user