busybox

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BUSYBOX = "busybox"

Variables

View Source
var Index = &ice.Context{Name: BUSYBOX, Help: "busybox",
	Configs: map[string]*ice.Config{
		BUSYBOX: {Name: BUSYBOX, Help: "busybox", Value: kit.Data(
			"source", "https://busybox.net/downloads/busybox-1.32.0.tar.bz2",
		)},
	},
	Commands: map[string]*ice.Command{
		ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {

		}},
		ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {}},

		BUSYBOX: {Name: "busybox port=auto path=auto auto 启动 构建 下载", Help: "busybox", Action: map[string]*ice.Action{
			"download": {Name: "download", Help: "下载", Hand: func(m *ice.Message, arg ...string) {
				m.Cmdy(code.INSTALL, "download", m.Conf(BUSYBOX, kit.META_SOURCE))
			}},
			"build": {Name: "build", Help: "构建", Hand: func(m *ice.Message, arg ...string) {
				m.Option("install", "_install")
				m.Option("prepare", func(p string) {
					m.Option(cli.CMD_DIR, p)
					m.Cmdy(cli.SYSTEM, "make", "defconfig")
				})
				m.Cmdy(code.INSTALL, "build", m.Conf(BUSYBOX, kit.META_SOURCE))
			}},
			"start": {Name: "start", Help: "启动", Hand: func(m *ice.Message, arg ...string) {
				m.Optionv("prepare", func(p string) []string {
					m.Option(cli.CMD_DIR, p)
					m.Cmd(cli.SYSTEM, "ln", "-s", "_install", "install")
					return []string{}
				})
				m.Cmdy(code.INSTALL, "start", m.Conf(BUSYBOX, kit.META_SOURCE), "bin/busybox")
			}},
		}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			m.Cmdy(code.INSTALL, path.Base(m.Conf(BUSYBOX, kit.META_SOURCE)), arg)
		}},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL