Skip to content

Commit

Permalink
remove non numeric characters from snapshot id (#76)
Browse files Browse the repository at this point in the history
Snapper support enhanced
  • Loading branch information
hrotkogabor authored and Antynea committed Dec 7, 2019
1 parent cb0b55a commit 4a882e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 41_snapshots-btrfs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ snapshot_list()
local entry="${entries[$i]}"
for j in "${!snapper_ids[@]}"; do
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
local snapper_type=$(trim "${snapper_types[$j]}")
local snapper_description=$(trim "${snapper_descriptions[$j]}")
Expand Down

0 comments on commit 4a882e7

Please sign in to comment.