righted md5sum

This commit is contained in:
Michael Rodin 2023-09-02 20:54:08 +02:00
parent 2fb71af96e
commit e3e13d257c

View file

@ -27,6 +27,7 @@ recursive_backup() {
remotehash="""$(sqlite3 $hashtemp "$sqlcommand")""" # get hash from database remotehash="""$(sqlite3 $hashtemp "$sqlcommand")""" # get hash from database
if [[ -z $remotehash ]]; then entryexists=false; else entryexists=true; fi # if file entry (and hash) exists, save as bool if [[ -z $remotehash ]]; then entryexists=false; else entryexists=true; fi # if file entry (and hash) exists, save as bool
localhash="$(md5sum "$k")" # hash of local version of file localhash="$(md5sum "$k")" # hash of local version of file
localhash="${localhash%% *}"
done_files=$(($done_files+1)) done_files=$(($done_files+1))
progress=$(($done_files*100/$total_files)) progress=$(($done_files*100/$total_files))
if [[ "$remotehash" == "$localhash" ]]; then action="Skip"; continue; fi # if the has his the same, skip backuup if [[ "$remotehash" == "$localhash" ]]; then action="Skip"; continue; fi # if the has his the same, skip backuup