From 11d38df23c069e3e039cd4919327c8e494f030a1 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 30 Sep 2023 03:29:45 +0300 Subject: Renamed ak-get-latest to ak-get-zlatest --- README | 2 +- api/make_cache.sh | 2 +- api/routes/getZLatest/index.js | 2 +- api/tests/node_local_zlatest.sh | 2 +- bin/ak-config | 2 +- bin/ak-get-latest | 2 -- bin/ak-get-zlatest | 2 ++ 7 files changed, 7 insertions(+), 7 deletions(-) delete mode 100755 bin/ak-get-latest create mode 100755 bin/ak-get-zlatest diff --git a/README b/README index 4b02cca..637a62e 100644 --- a/README +++ b/README @@ -217,7 +217,7 @@ ak-extract-cids # Prints the CIDs from your ZCHAIN for further usage ak-get-akid # Returns IPFS CID of your AKID (ak-config) ak-get-chain-minified # Obsolete, ak-enter default output ak-get-gpg # Return your GPG key as IPFS CID -ak-get-latest # Returns zlatest ZBLOCK according to IPFS FS +ak-get-zlatest # Returns zlatest ZBLOCK according to IPFS FS ak-tempassin # Creates temporary directories Logging diff --git a/api/make_cache.sh b/api/make_cache.sh index 299cc00..94ec8a9 100755 --- a/api/make_cache.sh +++ b/api/make_cache.sh @@ -1,5 +1,5 @@ #!/bin/bash ak-find-latest-mined-sblock > $AK_CACHEDIR/ak-find-latest-mined-sblock.json ak-get-chain-minified > $AK_CACHEDIR/ak-get-chain-minified.json -ak-get-latest > $AK_CACHEDIR/ak-get-latest.json +ak-get-zlatest > $AK_CACHEDIR/ak-get-zlatest.json diff --git a/api/routes/getZLatest/index.js b/api/routes/getZLatest/index.js index 3eeca81..4dc1899 100644 --- a/api/routes/getZLatest/index.js +++ b/api/routes/getZLatest/index.js @@ -9,7 +9,7 @@ const { spawn } = require('child_process'); * */ module.exports = (req, res) => { - const command = spawn("ak-get-latest"); + const command = spawn("ak-get-zlatest"); command.stdout.on("data", data => { res.send({zlatest:`${data}`}); }); diff --git a/api/tests/node_local_zlatest.sh b/api/tests/node_local_zlatest.sh index f562bc6..b470f1d 100755 --- a/api/tests/node_local_zlatest.sh +++ b/api/tests/node_local_zlatest.sh @@ -2,7 +2,7 @@ PROGRAM="$(basename $0)" printf '[%s]\n' "$PROGRAM" API_RES="$(curl http://127.0.0.1:8610/v0/zlatest 2>/dev/null | sha512sum - | awk '{ printf $1 }')" -CMD_RES="$(ak-get-latest | sed -e 's/^/{"zlatest":"/; s/$/"}/' | sha512sum - | awk '{ printf $1 }')" +CMD_RES="$(ak-get-zlatest | sed -e 's/^/{"zlatest":"/; s/$/"}/' | sha512sum - | awk '{ printf $1 }')" printf "TEST /zlatest\n" printf "\t01:\tLatest is the same between API response and CLI..." if [ "$API_RES" == "$CMD_RES" ] diff --git a/bin/ak-config b/bin/ak-config index 8022e42..81e2029 100755 --- a/bin/ak-config +++ b/bin/ak-config @@ -23,7 +23,7 @@ show(){ "genesis":"'$(cat $HOME/.arching-kaos/config/zgenesis)'", "gpg":"'$GPG_PUB_KEY'", "zchain":"'$(cat $HOME/.arching-kaos/config/zchain)'", - "zlatest":"'$(ak-get-latest)'" + "zlatest":"'$(ak-get-zlatest)'" }'; } diff --git a/bin/ak-get-latest b/bin/ak-get-latest deleted file mode 100755 index 36de493..0000000 --- a/bin/ak-get-latest +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -ak-ipfs-files-stat /zlatest | head -n 1| tr -d '\n' diff --git a/bin/ak-get-zlatest b/bin/ak-get-zlatest new file mode 100755 index 0000000..36de493 --- /dev/null +++ b/bin/ak-get-zlatest @@ -0,0 +1,2 @@ +#!/bin/bash +ak-ipfs-files-stat /zlatest | head -n 1| tr -d '\n' -- cgit v1.2.3