diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-04-03 05:15:00 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-04-03 05:15:00 +0300 |
commit | fc91066907e4d16a951c8d72d23aa610945f5407 (patch) | |
tree | 8d66ab33ae012ba185810b7462cd58687b6be38b /bin/ak-zchain-chk | |
parent | ad7d6281475c4adb67e0a43017803aeb4a9059ce (diff) | |
download | arching-kaos-tools-fc91066907e4d16a951c8d72d23aa610945f5407.tar.gz arching-kaos-tools-fc91066907e4d16a951c8d72d23aa610945f5407.tar.bz2 arching-kaos-tools-fc91066907e4d16a951c8d72d23aa610945f5407.zip |
Clean up, elimination of duplicate tempassins, fixed current directory problems, introduced new tool
Diffstat (limited to 'bin/ak-zchain-chk')
-rwxr-xr-x | bin/ak-zchain-chk | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/ak-zchain-chk b/bin/ak-zchain-chk index 946919a..c5a97cf 100755 --- a/bin/ak-zchain-chk +++ b/bin/ak-zchain-chk @@ -43,8 +43,7 @@ zblock="$entrance" declare -A blocks_found # Enter temp folder -TEMPASSIN="/tmp/aktmp_$(date -u +%s)" -mkdir $TEMPASSIN +TEMPASSIN="$(ak-tempassin)" cd $TEMPASSIN counter=0 @@ -76,20 +75,20 @@ do # We concatenate the zblock's contents, pipe them through filter # ak-json2bash and output them to tmp-file - ak-ipfs-cat $zblock | ak-json2bash > $TEMPASSIN/tmp-zblock + ak-ipfs-cat $zblock | ak-json2bash > tmp-zblock ak-logthis "[INFO]" "ZBLOCK $zblock READ" # Supposingly you are on a safe environment and you only have # access to your chain, I would consider mild secure to source # the files into your bash. # File an issue/pull request if you think it can be done better!! - source $TEMPASSIN/tmp-zblock + source tmp-zblock ak-logthis "[INFO]" "ZBLOCK SOURCED" # Same as above applies to BLOCK and DATA subparts of each ZBLOCK # BLOCKS - ak-ipfs-cat $block | ak-json2bash > $TEMPASSIN/tmp-block - source $TEMPASSIN/tmp-block + ak-ipfs-cat $block | ak-json2bash > tmp-block + source tmp-block ak-logthis "[INFO]" "BLOCK $block SOURCED" touch $BLOCKDIR/$block ak-logthis "[INFO]" "BLOCK REFERENCED" |