diff --git a/Makefile b/Makefile index 0fdaf2f..202b2f0 100644 --- a/Makefile +++ b/Makefile @@ -16,4 +16,4 @@ lint: $(GO) fmt ./... install: build - @cp fes /usr/bin/local + @cp fes /usr/local/bin diff --git a/index.html b/index.html index 1bfec22..686223f 100644 --- a/index.html +++ b/index.html @@ -650,6 +650,14 @@ return site util.copyright(link: string, holder: string) Used when setting the website copyright holder. + + util.ls(dir) + Returns a table of the files in the given directory + + + util.run(cmd) + Returns the output of the provided command. stdout only. +

Dkjson

diff --git a/lib/util.lua b/lib/util.lua index 5699286..a1e729c 100644 --- a/lib/util.lua +++ b/lib/util.lua @@ -32,4 +32,15 @@ function M.ls(dir) return t end +function M.run(cmd) + cmd = cmd or "echo nil" + local p = io.popen(cmd) + if not p then + return nil + end + local r = p:read("*a"):gsub("%s+$", "") + p:close() + return r +end + return M diff --git a/modules/version/version.go b/modules/version/version.go index b0c4e52..e4cec3a 100644 --- a/modules/version/version.go +++ b/modules/version/version.go @@ -9,7 +9,7 @@ var gitCommit string = "devel" const PROGRAM_NAME string = "fes" const PROGRAM_NAME_LONG string = "fes/fSD" -const VERSION string = "1.1.1" +const VERSION string = "1.2.0" func Version() { fmt.Printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION)