From f5debd3c7e930bfa7b48b55326f67a86ccd388ef Mon Sep 17 00:00:00 2001 From: meo Date: Sat, 14 Dec 2024 12:12:14 +0100 Subject: [PATCH] fix: forgot to remove variable --- zfs-inplace-rebalancing.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zfs-inplace-rebalancing.sh b/zfs-inplace-rebalancing.sh index ad0ae53..262d0f6 100755 --- a/zfs-inplace-rebalancing.sh +++ b/zfs-inplace-rebalancing.sh @@ -163,14 +163,16 @@ function rebalance() { # note: no lsattr on Mac OS or FreeBSD # file permissions, owner, group size, modification time - original_md5="${original_md5} $(stat -f "%Sp %Su %Sg %z %m" "${file_path}")" + original_md5="$(stat -f "%Sp %Su %Sg %z %m" "${file_path}")" # file content original_md5="${original_md5} $(md5 -q "${file_path}")" # file permissions, owner, group size, modification time - copy_md5="${copy_md5} $(stat -f "%Sp %Su %Sg %z %m" "${tmp_file_path}")" + copy_md5="$(stat -f "%Sp %Su %Sg %z %m" "${tmp_file_path}")" # file content copy_md5="${copy_md5} $(md5 -q "${tmp_file_path}")" + # remove the temporary extension + copy_md5=${copy_md5%"${tmp_extension}"} else echo "Unsupported OS type: $OSTYPE" exit 1