dotfiles/overlays/rolling_datasets/functions/get_old_datasets
magic_rb 23c7002368
Mount old versions of home on omen
Signed-off-by: magic_rb <richard@brezak.sk>
2023-10-18 14:30:17 +02:00

7 lines
241 B
Bash

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