diff --git a/PKGBUILD b/PKGBUILD index 9d8bee8..cb73618 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,7 +9,7 @@ license=('GPL3') depends=('rsync') optdepends=('mkrypt: for encryption') source=(msynk.sh _msynk.compdef.zsh msynk.1.man template) -md5sums=(d22b062903a9fcd1bd9508cbd06cbc6c 8398678146d9f8a5669e8b788502b3b8 d089828a93bf8e4ffd9051d8ea756ab8 492028aa2f08528f1d476376884959b2) +md5sums=(c9fc4a54a7081d0ee3e7c43a636b47c3 8398678146d9f8a5669e8b788502b3b8 d089828a93bf8e4ffd9051d8ea756ab8 492028aa2f08528f1d476376884959b2) package() { mkdir -p "${pkgdir}/usr/bin" diff --git a/msynk.sh b/msynk.sh index 6e2b28b..eef8941 100755 --- a/msynk.sh +++ b/msynk.sh @@ -117,7 +117,7 @@ sync_sender_to_receiver() if [[ -n $encrypt ]]; then # check if TMP_DIR has enough space tmp_free=$(df --output=avail $TMP_DIR | grep -E "[[:digit:]]+") - path_size=$(du -s "$path" | sed -e "s/[^0-9]//g") + path_size=$(du -s "$path" | awk '{print $1}' | sed -e "s/[^0-9]//g") if [[ $tmp_free -le $path_size ]]; then printf "$FMT_ERROR" "Not enough space on $TMP_DIR to copy $path! $TMP_DIR $tmp_free free - Size $path: $path_size" printf "$FMT_MESSAGE" "" "If using a tmpfs, you can increase its size by running: 'sudo mount -o remount,size=XXG,noatime /tmp' to increase the size to XXG (You will need a large enough swap space)"