From fc91066907e4d16a951c8d72d23aa610945f5407 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 3 Apr 2023 05:15:00 +0300 Subject: Clean up, elimination of duplicate tempassins, fixed current directory problems, introduced new tool --- bin/ak-pack_z_block | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'bin/ak-pack_z_block') diff --git a/bin/ak-pack_z_block b/bin/ak-pack_z_block index 76e87df..7465897 100755 --- a/bin/ak-pack_z_block +++ b/bin/ak-pack_z_block @@ -74,16 +74,7 @@ main(){ PREVIOUS=$(ak-ipfs-files-stat /zlatest | head -n 1) # We create a block of json like this: - cat > block < block BLOCK="block" BLOCK_SIG=$BLOCK".asc" # We have a block now, so we sign it @@ -96,12 +87,7 @@ EOF BLOCK=$(ak-ipfs-add $BLOCK) # So we now do the think almost again - cat > zblock << EOF -{ - "block":"$BLOCK", - "block_signature":"$BLOCK_SIGNATURE" -} -EOF + printf '{"block":"%s","block_signature":"%s"}' $BLOCK $BLOCK_SIGNATURE > zblock ZBL="zblock" # and we add it on IPFS ZBLOCK=$(ak-ipfs-add $ZBL) @@ -110,8 +96,7 @@ EOF if [ ! -z $2 ]; then - PWD="$(pwd)" - MESSAGE="$PWD/$2" + MESSAGE="$2" ACTION="$1" if [ -f "$MESSAGE" ]; then main -- cgit v1.2.3