aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-zchain-chk
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-07-30 20:03:30 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-07-30 20:03:30 +0300
commitc6469c308c62218884077a81c3544e9b0128327f (patch)
tree99c62ea90a3aad64281f12b12ab12a25394b6448 /bin/ak-zchain-chk
parent6fc35fa5ddf17dfeda8d09de124fef0466ace0bd (diff)
downloadarching-kaos-tools-c6469c308c62218884077a81c3544e9b0128327f.tar.gz
arching-kaos-tools-c6469c308c62218884077a81c3544e9b0128327f.tar.bz2
arching-kaos-tools-c6469c308c62218884077a81c3544e9b0128327f.zip
Added ak- or AK_ prefix to functions called and variables
Diffstat (limited to 'bin/ak-zchain-chk')
-rwxr-xr-xbin/ak-zchain-chk14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/ak-zchain-chk b/bin/ak-zchain-chk
index c5a97cf..5ec9960 100755
--- a/bin/ak-zchain-chk
+++ b/bin/ak-zchain-chk
@@ -19,23 +19,23 @@ then
elif [ ! -z "$1" ] && [ "$1" == "-f" ] || [ "$1" == "--fix" ]
then
fix="1"
- entrance="$(cat $ZLATEST)"
+ entrance="$(cat $AK_ZLATEST)"
elif [ ! -z "$1" ] && [ "$1" == "-n" ] || [ "$1" == "--chain" ]
then
- entrance="$(ipns-resolve $2)"
+ entrance="$(ak-ipns-resolve $2)"
elif [ ! -z "$1" ]
then
entrance="$1"
else
# By default we ak-enter from the latest block
# We can alter this by changing this value
- entrance="$(cat $ZLATEST)"
+ entrance="$(cat $AK_ZLATEST)"
fi
# We assign the IPFS CIDv0 of an empty file as this is used
# as our GENESIS block, hence the "seed" that the tree grows
# from.
-seed="$(cat $ZGENESIS)"
+seed="$(cat $AK_ZGENESIS)"
# We assume that we found the entrance inside a block, hence
# ZBLOCK is labeled as previous
@@ -70,7 +70,7 @@ do
# We create files named after each ZBLOCK IPFS CID for later
# reference. Files are empty.
- touch $ZBLOCKDIR/$zblock
+ touch $AK_ZBLOCKDIR/$zblock
ak-logthis "[INFO]" "Created reference"
# We concatenate the zblock's contents, pipe them through filter
@@ -90,7 +90,7 @@ do
ak-ipfs-cat $block | ak-json2bash > tmp-block
source tmp-block
ak-logthis "[INFO]" "BLOCK $block SOURCED"
- touch $BLOCKDIR/$block
+ touch $AK_BLOCKDIR/$block
ak-logthis "[INFO]" "BLOCK REFERENCED"
module="$(echo $action | sed -e 's/\// /g' | awk '{ print $1 }')"
ak-logthis "[INFO]" "DATA is $module module."
@@ -101,7 +101,7 @@ do
echo "$timestamp : $zblock -> $block -> $previous"
blocks_found[$counter]="$block"
fi
- touch $DATADIR/$data
+ touch $AK_DATADIR/$data
# Now, since we sourced the BLOCK to our terminal, we can search
# for $previous variable. In case we don't find one, we exit with