From 3eb7eb786179c5cc28c3543772965468044d6495 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Wed, 24 Oct 2018 00:29:06 +0200 Subject: [PATCH] Support snapper 0.7.0 (#57) Snapper changed the order of columns, ID now comes before type. --- 41_snapshots-btrfs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index 3f55af9..bc71fce 100755 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -237,8 +237,8 @@ snapshot_list() # Query info from snapper if it is installed type snapper >/dev/null 2>&1 if [[ $? -eq 0 ]]; then - local snapper_ids=($(snapper -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 2)) - local snapper_types=($(snapper -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 1)) + local snapper_ids=($(snapper -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 1)) + local snapper_types=($(snapper -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 2)) IFS=$'\n' local snapper_descriptions=($(snapper -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 7))