diff options
author | Andy McLeod <andy.mcleod@shopify.com> | 2017-04-06 16:27:14 -0400 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-04-08 20:53:49 +0000 |
commit | 99009a8e400a39ad29d241d479a74cf6843f121a (patch) | |
tree | 8b96e9982a7a08fb8f90b35a9f8066b3a4ae4e8c /testing/ejson/10-patch1.patch | |
parent | 9674a6492ddd1acc695f1b315f7405121ab6fc7c (diff) | |
download | aports-99009a8e400a39ad29d241d479a74cf6843f121a.tar.bz2 aports-99009a8e400a39ad29d241d479a74cf6843f121a.tar.xz |
testing/ejson: new aport
Adds a new piece of software to aports. EJSON is a small library to
manage encrypted secrets using asymmetric encryption.
This aport includes only the binary cli program. It omits the man pages
and ruby gem.
Diffstat (limited to 'testing/ejson/10-patch1.patch')
-rw-r--r-- | testing/ejson/10-patch1.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/ejson/10-patch1.patch b/testing/ejson/10-patch1.patch new file mode 100644 index 0000000000..baafd256de --- /dev/null +++ b/testing/ejson/10-patch1.patch @@ -0,0 +1,36 @@ +--- ejson/cmd/ejson/main.go.orig 2017-04-06 19:25:23.711948831 +0000 ++++ ejson/cmd/ejson/main.go 2017-04-06 19:25:41.585791634 +0000 +@@ -4,33 +4,15 @@ import ( + "fmt" + "os" + "runtime" +- "syscall" + + "github.com/codegangsta/cli" + ) + +-func execManpage(sec, page string) { +- if err := syscall.Exec("/usr/bin/env", []string{"/usr/bin/env", "man", sec, page}, os.Environ()); err != nil { +- fmt.Println("Exec error:", err) +- } +- os.Exit(1) +-} + + func main() { + // Encryption is expensive. We'd rather burn cycles on many cores than wait. + runtime.GOMAXPROCS(runtime.NumCPU()) + +- // Rather than using the built-in help printer, display the bundled manpages. +- cli.HelpPrinter = func(templ string, data interface{}) { +- if cmd, ok := data.(cli.Command); ok { +- switch cmd.Name { +- case "encrypt", "decrypt", "keygen": +- execManpage("1", "ejson-"+cmd.Name) +- } +- } +- execManpage("1", "ejson") +- } +- + app := cli.NewApp() + app.Flags = []cli.Flag{ + cli.StringFlag{ |