aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-04-10 15:54:33 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-04-10 15:54:33 +0300
commit762bee582ff2634eeef8fb08b42145d029bd1d7a (patch)
tree9d63c038c2be2d16dfa590f6eabc24cc74f5d6f5 /bin
parent27e2fe661df3e299d6ef9f5dfa39f12f4633746a (diff)
downloadarching-kaos-tools-762bee582ff2634eeef8fb08b42145d029bd1d7a.tar.gz
arching-kaos-tools-762bee582ff2634eeef8fb08b42145d029bd1d7a.tar.bz2
arching-kaos-tools-762bee582ff2634eeef8fb08b42145d029bd1d7a.zip
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ak-data-expand7
1 files changed, 6 insertions, 1 deletions
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"