mirror of
https://shylinux.com/x/icebergs
synced 2025-04-28 18:22:02 +08:00
opt some
This commit is contained in:
parent
b7bc327311
commit
bd5c98ceca
@ -147,8 +147,8 @@ ish_miss_prepare_develop
|
|||||||
ish_miss_prepare_compile
|
ish_miss_prepare_compile
|
||||||
ish_miss_prepare_install
|
ish_miss_prepare_install
|
||||||
|
|
||||||
# ish_miss_prepare_intshell
|
# ish_miss_prepare_volcanos
|
||||||
# ish_miss_prepare_contexts
|
# ish_miss_prepare_learning
|
||||||
# ish_miss_prepare_icebergs
|
# ish_miss_prepare_icebergs
|
||||||
# ish_miss_prepare_toolkits
|
# ish_miss_prepare_toolkits
|
||||||
|
|
||||||
|
@ -5,8 +5,10 @@ import (
|
|||||||
"github.com/shylinux/icebergs/base/cli"
|
"github.com/shylinux/icebergs/base/cli"
|
||||||
"github.com/shylinux/icebergs/base/mdb"
|
"github.com/shylinux/icebergs/base/mdb"
|
||||||
"github.com/shylinux/icebergs/base/nfs"
|
"github.com/shylinux/icebergs/base/nfs"
|
||||||
|
"github.com/shylinux/icebergs/base/web"
|
||||||
kit "github.com/shylinux/toolkits"
|
kit "github.com/shylinux/toolkits"
|
||||||
|
|
||||||
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@ -96,7 +98,7 @@ const AUTOGEN = "autogen"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.Merge(&ice.Context{
|
Index.Merge(&ice.Context{
|
||||||
Commands: map[string]*ice.Command{
|
Commands: map[string]*ice.Command{
|
||||||
AUTOGEN: {Name: "autogen path auto create binpack", Help: "生成", Action: map[string]*ice.Action{
|
AUTOGEN: {Name: "autogen path auto create binpack script", Help: "生成", Action: map[string]*ice.Action{
|
||||||
mdb.CREATE: {Name: "create main=src/main.go@key name=hi@key from=usr/icebergs/misc/bash/bash.go@key", Help: "模块", Hand: func(m *ice.Message, arg ...string) {
|
mdb.CREATE: {Name: "create main=src/main.go@key name=hi@key from=usr/icebergs/misc/bash/bash.go@key", Help: "模块", Hand: func(m *ice.Message, arg ...string) {
|
||||||
if p := path.Join("src", m.Option("name"), m.Option("name")+".shy"); !kit.FileExists(p) {
|
if p := path.Join("src", m.Option("name"), m.Option("name")+".shy"); !kit.FileExists(p) {
|
||||||
_autogen_script(m, p)
|
_autogen_script(m, p)
|
||||||
@ -129,6 +131,13 @@ func init() {
|
|||||||
m.RenameAppend("path", arg[0])
|
m.RenameAppend("path", arg[0])
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
|
mdb.SCRIPT: {Name: "script", Help: "脚本", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
miss := "etc/miss.sh"
|
||||||
|
if _, e := os.Stat(miss); os.IsNotExist(e) {
|
||||||
|
m.Cmd(nfs.SAVE, miss, m.Conf(web.DREAM, "meta.miss"))
|
||||||
|
}
|
||||||
|
m.Echo(miss)
|
||||||
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
if m.Option(nfs.DIR_ROOT, "src"); len(arg) == 0 || strings.HasSuffix(arg[0], "/") {
|
if m.Option(nfs.DIR_ROOT, "src"); len(arg) == 0 || strings.HasSuffix(arg[0], "/") {
|
||||||
m.Cmdy(nfs.DIR, kit.Select("./", arg, 0))
|
m.Cmdy(nfs.DIR, kit.Select("./", arg, 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user