dotfiles/overlays/rolling_datasets/functions/get_old_datasets
magic_rb 706d3bb1b1
Add overlay for roll_dataset
Signed-off-by: magic_rb <richard@brezak.sk>
2023-10-07 22:40:05 +02:00

7 lines
234 B
Bash

# -*- mode: shell-script -*-
function get_old_datasets()
{
dataset="$1"
zfs list "$dataset" -t filesystem -r -H -o name | xargs -I {} ${final.runtimeShell} -c 'echo "$1" | rev | cut -f 1 -d "/" | rev' sh {} | grep -v "$dataset"
}