diff options
-rwxr-xr-x | lib/_ak_fs | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -145,7 +145,9 @@ _ak_fs_import(){ # The idea is: # sha256sum as quick pointer to root of the tree # + _ak_log_info "Storing original hash of $1 along with its name" sha512sum "$1" > $TEMPORARYDIR/3rd_gen_map + _ak_log_info "Encoding to base64" base64 $1 > file FILE="file" fi @@ -170,6 +172,7 @@ _ak_fs_import(){ # We split the file into 4*1024 bytes and output the chunks into TECHDIR split -a 50 -b $FACTOR --additional-suffix ".chk" -d "$FILE" "$TECHDIR/$(basename "$FILE")-" fi + _ak_log_info "File done splitting" # We go over there... cd $TECHDIR @@ -190,15 +193,15 @@ _ak_fs_import(){ temp=`expr $temp / 2` timesRan=`expr $timesRan + 1` done - printf "Ran %s times \n" "$timesRan" - printf "Total chunks %s \n" "$totalChunks" + _ak_log_debug "Ran $timesRan times" + _ak_log_debug "Total chunks $totalChunks" workingIndex="$TEMPORARYDIR/map" c=$timesRan while [ $c -ne 0 ] do a=1 - printf "Level: %s, will work on %s chunks\n" "$c" "$totalChunks" + _ak_log_debug "Level: $c, will work on $totalChunks chunks" while [[ "$a" -lt "$totalChunks" ]] do b=`expr "$a" + 1` @@ -263,7 +266,7 @@ _ak_fs_import(){ rm -rf $TEMPORARYDIR # and print the MAPFILEHASH - echo "$MAPFILEHASH" + echo "$mp512p" } |