mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
opt some
This commit is contained in:
parent
9855e122db
commit
18b14bf393
@ -73,15 +73,6 @@ func _binpack_all(m *ice.Message) {
|
|||||||
_binpack_file(m, w, ice.MAKEFILE)
|
_binpack_file(m, w, ice.MAKEFILE)
|
||||||
_binpack_file(m, w, ice.README_MD)
|
_binpack_file(m, w, ice.README_MD)
|
||||||
fmt.Fprintln(w)
|
fmt.Fprintln(w)
|
||||||
mdb.HashSelects(m).Sort(nfs.PATH).Tables(func(value ice.Maps) {
|
|
||||||
if s, e := nfs.StatFile(m, value[nfs.PATH]); e == nil {
|
|
||||||
if s.IsDir() {
|
|
||||||
_binpack_dir(m, w, value[nfs.PATH])
|
|
||||||
} else {
|
|
||||||
_binpack_file(m, w, value[nfs.PATH])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
list := map[string]bool{}
|
list := map[string]bool{}
|
||||||
ctx.TravelCmd(m, func(key, file, line string) {
|
ctx.TravelCmd(m, func(key, file, line string) {
|
||||||
dir := path.Dir(file)
|
dir := path.Dir(file)
|
||||||
@ -92,7 +83,7 @@ func _binpack_all(m *ice.Message) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
list[dir] = true
|
list[dir] = true
|
||||||
m.Cmd(nfs.DIR, dir, nfs.PATH, kit.Dict(nfs.DIR_ROOT, nfs.PWD, nfs.DIR_REG, `.*\.(sh|shy|js)$`)).Tables(func(value ice.Maps) {
|
m.Cmd(nfs.DIR, dir, nfs.PATH, kit.Dict(nfs.DIR_ROOT, nfs.PWD, nfs.DIR_REG, kit.ExtReg("(sh|shy|js)"))).Tables(func(value ice.Maps) {
|
||||||
if list[value[nfs.PATH]] {
|
if list[value[nfs.PATH]] {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -102,6 +93,15 @@ func _binpack_all(m *ice.Message) {
|
|||||||
_binpack_file(m, w, value[nfs.PATH])
|
_binpack_file(m, w, value[nfs.PATH])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
mdb.HashSelects(m).Sort(nfs.PATH).Tables(func(value ice.Maps) {
|
||||||
|
if s, e := nfs.StatFile(m, value[nfs.PATH]); e == nil {
|
||||||
|
if s.IsDir() {
|
||||||
|
_binpack_dir(m, w, value[nfs.PATH])
|
||||||
|
} else {
|
||||||
|
_binpack_file(m, w, value[nfs.PATH])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user