From 762bee582ff2634eeef8fb08b42145d029bd1d7a Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 10 Apr 2023 15:54:33 +0300 Subject: Changed way that we unpack the data field. Now we return both the IPFS hash value in the data field and the inner data block --- bin/ak-data-expand | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/ak-data-expand b/bin/ak-data-expand index 08aae20..2d5be7a 100755 --- a/bin/ak-data-expand +++ b/bin/ak-data-expand @@ -1,5 +1,9 @@ #!/bin/bash PROGRAM="$(basename $0)" +if [ ! -d $AK_WORKDIR/ipfs ] +then + mkdir $AK_WORKDIR/ipfs +fi logit(){ ak-logthis "<$PROGRAM>" "$1" "$2" } @@ -87,8 +91,9 @@ then logit "[ERROR]" "Error while verifying signature for $DATA" exit 1 fi + mv $DATA $AK_WORKDIR/ipfs logit "[INFO]" "Block signature verified" - echo -n '"data":{"'$1'":'$(ak-ipfs-cat $1)'},' + echo -n '"data":"'$1'","'$1'":'$(ak-ipfs-cat $1)',' exit 0 else echo "Usage: $PROGRAM HASH GPG" -- cgit v1.2.3