mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-10-20 02:42:03 +08:00
remove non numeric characters from snapshot id (#76)
Snapper support enhanced
This commit is contained in:
@@ -300,6 +300,10 @@ snapshot_list()
|
|||||||
local entry="${entries[$i]}"
|
local entry="${entries[$i]}"
|
||||||
for j in "${!snapper_ids[@]}"; do
|
for j in "${!snapper_ids[@]}"; do
|
||||||
local snapper_id="${snapper_ids[$j]//[[:space:]]/}"
|
local snapper_id="${snapper_ids[$j]//[[:space:]]/}"
|
||||||
|
# remove other non numeric characters
|
||||||
|
snapper_id="${snapper_id//\*/}"
|
||||||
|
snapper_id="${snapper_id//\+/}"
|
||||||
|
snapper_id="${snapper_id//-/}"
|
||||||
if [[ "$snapper_id" == "$id" ]]; then
|
if [[ "$snapper_id" == "$id" ]]; then
|
||||||
local snapper_type=$(trim "${snapper_types[$j]}")
|
local snapper_type=$(trim "${snapper_types[$j]}")
|
||||||
local snapper_description=$(trim "${snapper_descriptions[$j]}")
|
local snapper_description=$(trim "${snapper_descriptions[$j]}")
|
||||||
|
|||||||
Reference in New Issue
Block a user