From 362c529d4ecbe5c5ba14f7fb4c0c486e15810b71 Mon Sep 17 00:00:00 2001 From: shylinux Date: Fri, 11 Dec 2020 10:43:50 +0800 Subject: [PATCH] add nfs.upload --- base/nfs/nfs.go | 9 +++++++++ misc/vim/vim.shy | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/base/nfs/nfs.go b/base/nfs/nfs.go index c12d8006..7d16c6ab 100644 --- a/base/nfs/nfs.go +++ b/base/nfs/nfs.go @@ -353,6 +353,15 @@ var Index = &ice.Context{Name: "nfs", Help: "存储模块", _file_list(m, arg[2], arg[1], 0, m.Option(DIR_DEEP) == "true", kit.Select(TYPE_BOTH, m.Option(DIR_TYPE)), nil, []string{"time", "size", "type", "path"}) }}, + "upload": {Name: "render type name text", Help: "渲染", Hand: func(m *ice.Message, arg ...string) { + up := kit.Simple(m.Optionv(ice.MSG_UPLOAD)) + + if p := path.Join(m.Option("path"), up[1]); m.Option(ice.MSG_USERPOD) == "" { + m.Cmdy("cache", "watch", up[0], p) + } else { + m.Cmdy("spide", "dev", "save", p, "GET", kit.MergeURL2(m.Option(ice.MSG_USERWEB), "/share/cache/"+up[0])) + } + }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { if len(arg) == 0 { arg = append(arg, "") diff --git a/misc/vim/vim.shy b/misc/vim/vim.shy index d2387238..96496818 100644 --- a/misc/vim/vim.shy +++ b/misc/vim/vim.shy @@ -14,7 +14,7 @@ field "文档" web.code.inner args `usr/install/vim81/_install/share/vim/vim81/d section "构建" spark shell ` yum install -y wget make gcc -yum install -y bzip2.x86_64 +yum install -y ncurses-devel.x86_64 bzip2.x86_64 wget ftp://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2 tar xvf vim-8.1.tar.bz2 && cd vim81