Skip to content

Commit

Permalink
Be explicit on matching UUID, and handle case where it's at the end o…
Browse files Browse the repository at this point in the history
…f line.
  • Loading branch information
craigfrancis authored May 13, 2020
1 parent 7c0fadb commit 280a2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rename-efi-entry.bash
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ for disk_name in "${disk_names[@]}" ; do

# parse partition data and add to the result array
for partition_data_line in "${partition_data_array[@]}" ; do
if [[ $partition_data_line =~ ^([^[:blank:]]+)[[:blank:]]:[[:blank:]].*[[:blank:]]uuid=([^,]+) ]] ; then
if [[ $partition_data_line =~ ^([^[:blank:]]+)[[:blank:]]:[[:blank:]].*[[:blank:]]uuid=([^,[:blank:]]+) ]] ; then
device=${BASH_REMATCH[1]}
uuid_lowercase="${BASH_REMATCH[2],,}"
partitions[$uuid_lowercase]=$device
Expand Down

0 comments on commit 280a2c9

Please sign in to comment.