From be12face6349f883eb684906df624956c462342a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 3 Mar 2023 20:36:00 +0100 Subject: errol: add zigbee2mqtt --- tools/common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/common.sh b/tools/common.sh index a6b41fc..3f99479 100644 --- a/tools/common.sh +++ b/tools/common.sh @@ -125,7 +125,8 @@ copy() { store="$(readlink -f "$(result "$device")")" local freespace required; - freespace="$(_ssh "$device" df -B 1 /nix | awk 'NR == 2 { print $4 }')" + freespace_raw="$(_ssh "$device" df -B 1 --output=avail /nix)" + freespace="$(echo "$freespace_raw" | tail -1)" required="$(nix path-info -S "$store" | awk '{ print $2 }')" info "Free space on device: $(numfmt --to=iec "$freespace")" info "Required space: $(numfmt --to=iec "$required")" -- cgit v1.2.3