From 01180844e77930d7bdff8424ad08548635c62c34 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Thu, 18 Jul 2024 19:31:54 +0200 Subject: [PATCH] fix(script): Treat '@' and '+' in pkg names, ZFS doesn't like them (#3) Replace at characters ('@') indiscriminately with one dot each ('.'), replace plus characters ('+') with one underscore each ('_'). --- pacman-zfs-snapshot.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacman-zfs-snapshot.sh b/pacman-zfs-snapshot.sh index 438e939..eea1a56 100755 --- a/pacman-zfs-snapshot.sh +++ b/pacman-zfs-snapshot.sh @@ -359,6 +359,8 @@ function do_retention () { function main () { local pkgs_in_transaction pkgs_in_transaction=("${@}") + pkgs_in_transaction=("${pkgs_in_transaction[@]//+/_}") + pkgs_in_transaction=("${pkgs_in_transaction[@]//@/.}") local -a important_pkgs_in_transaction trivial_pkgs_in_transaction split_pkgs_by_importance "${pkgs_in_transaction[@]}"