From 78fa41359b2c942063f5a2e11860936ea3056b8b Mon Sep 17 00:00:00 2001 From: martyone Date: Sat, 23 Nov 2024 13:59:28 +0100 Subject: [PATCH] Deal with unicode box drawings in snapper's output --- bin/snap-sync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/snap-sync b/bin/snap-sync index 91a5457..0ef5949 100755 --- a/bin/snap-sync +++ b/bin/snap-sync @@ -366,7 +366,7 @@ for x in $selected_configs; do BACKUPDIR="$selected_mnt/$mybackupdir" $ssh test -d "$BACKUPDIR" || $ssh btrfs subvolume create "$BACKUPDIR" else - mybackupdir=$(snapper -c "$x" list -t single | awk -F"|" '/'"subvolid=$selected_subvolid, uuid=$selected_uuid"'/ {print $5}' | awk -F "," '/backupdir/ {print $1}' | awk -F"=" '{print $2}') + mybackupdir=$(snapper -c "$x" list -t single | sed 's/│/|/g' | awk -F"|" '/'"subvolid=$selected_subvolid, uuid=$selected_uuid"'/ {print $5}' | awk -F "," '/backupdir/ {print $1}' | awk -F"=" '{print $2}') BACKUPDIR="$selected_mnt/$mybackupdir" $ssh test -d $BACKUPDIR || die "%s is not a directory on %s.\n" "$BACKUPDIR" "$selected_uuid" fi