diff options
Diffstat (limited to 'bin/ak-sm-merkle-tree')
-rwxr-xr-x | bin/ak-sm-merkle-tree | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/ak-sm-merkle-tree b/bin/ak-sm-merkle-tree index 2ff6493..461930f 100755 --- a/bin/ak-sm-merkle-tree +++ b/bin/ak-sm-merkle-tree @@ -1,7 +1,7 @@ #!/bin/bash # # The concept is bit more complicated now -# +# # 1. For a given file we split in 4KB files inside a temporary directory # # 2. We then create a map file and a merkle tree containing the resulted files @@ -20,7 +20,7 @@ # 6. We are done! # -# Uncomment next line if you want to debug +# Uncomment next line if you want to debug # set -xe PROGRAM="$(basename $0)" @@ -134,9 +134,9 @@ fi # We go over there... cd $TECHDIR #set -xe -# We get every chunks' SHA512 and we craft a script to rename the chunks and +# We get every chunks' SHA512 and we craft a script to rename the chunks and # move them to CHKDIR -for file in $TEMPORARYDIR/chks/* +for file in $TEMPORARYDIR/chks/* do sha512sum $file >> $TEMPORARYDIR/map done @@ -195,7 +195,7 @@ fi # Reset file with uniq cat $TEMPORARYDIR/map | uniq > $TEMPORARYDIR/map2 cat $TEMPORARYDIR/map2 > $TEMPORARYDIR/map -rm $TEMPORARYDIR/map2 +rm $TEMPORARYDIR/map2 counter=0 while IFS="" read -r p || [ -n "$p" ] |