]> Cypherpunks.ru repositories - nncp.git/commitdiff
Build hjson-cli
authorSergey Matveev <stargrave@stargrave.org>
Sun, 11 Jul 2021 13:21:40 +0000 (16:21 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 11 Jul 2021 13:27:07 +0000 (16:27 +0300)
bin/.gitignore
bin/all.do
bin/clean.do
bin/hjson-cli.do [new file with mode: 0644]
doc/building.texi
doc/cfg/index.texi

index a5075448437f0c151a6f1de5726b8c3f4ba99962..b3d9328b902edf83c9b92b0abf5eb04465ec54ba 100644 (file)
@@ -1 +1,2 @@
+hjson-cli
 nncp-*
index 5519b54b1f3fa300471e0c2173a13a93844c81fa..2b31559dfdcb041cd4d18ccb850724d1fcb42f2f 100644 (file)
@@ -1,2 +1,2 @@
-redo-ifchange cmd.list
+redo-ifchange cmd.list hjson-cli
 redo-ifchange `cat cmd.list`
index 7dbb8583e43a223551dbf129c0064c326edfbea6..86a5019d3aebe704893b3736011ba343eac3c0ce 100644 (file)
@@ -1 +1 @@
-rm -f `cat cmd.list`
+rm -f `cat cmd.list` hjson-cli
diff --git a/bin/hjson-cli.do b/bin/hjson-cli.do
new file mode 100644 (file)
index 0000000..c7d40d2
--- /dev/null
@@ -0,0 +1,3 @@
+cd ../src
+GO=${GO:-go}
+$GO build -o ../bin/$3 github.com/hjson/hjson-go/hjson-cli
index afe9f40eb5d40a0ee5d97dee9e524d9a58322375..30376dce8a449b9fa0b65e3155d91772b9c2ffe9 100644 (file)
@@ -17,6 +17,7 @@ $ gpg --verify nncp-@value{VERSION}.tar.xz.sig nncp-@value{VERSION}.tar.xz
 $ xz --decompress --stdout nncp-@value{VERSION}.tar.xz | tar xf -
 $ cd nncp-@value{VERSION}
 $ redo all
+# look for bin/nncp-* binaries (and possibly hjson-cli one)
 @end example
 
 It uses @url{http://cr.yp.to/redo.html, redo} build system for that
@@ -28,7 +29,7 @@ in tarball. Following ones are tested to work with:
 @url{https://redo.readthedocs.io/, apenwarr/redo} (@code{contrib/do} is
 from that project), @url{https://github.com/leahneukirchen/redo-c, redo-c}.
 
-There is @command{install} make-target respecting @env{DESTDIR}. It will
+There is @command{install} target respecting @env{DESTDIR}. It will
 install binaries and info-documentation:
 
 @example
index b44f2430e1ef02cd00e196f0882a956a81e8b0c0..b1261a894ddd7dc8424785001e7869e67d735976 100644 (file)
@@ -30,6 +30,14 @@ neigh: {
 }
 @end verbatim
 
+Do not forget that Hjson can be safely converted to JSON and vice versa
+(loosing formatting and comments of course). By default
+@command{hjson-cli} utility from @code{github.com/hjson/hjson-go} is
+built together with @command{nncp-*} commands too. For querying
+information from the JSON from the command line you can use
+@code{github.com/itchyny/gojq} and @code{github.com/skanehira/gjo} for
+building it up.
+
 And for being able to communicate with at least one other node, you just
 need to add single key to the @code{neigh} section similar to the "self".