Skip to content

Commit 8302acc

Browse files
committed
Fix: Replace Perl-compatible \s with POSIX [ \t] in awk expressions for mawk compatibility
1 parent 6845af4 commit 8302acc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎41_snapshots-btrfs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fi
131131

132132
# Root subvolume UUID
133133
root_uuid_subvolume="$(btrfs subvolume show / 2>/dev/null | \
134-
awk -F':' '/^\s*UUID/ {gsub(/^[ \t]+/, "", $2); print $2}')"
134+
awk -F':' '/^[ \t]*UUID/ {gsub(/^[ \t]+/, "", $2); print $2}')"
135135
[ -z "$root_uuid_subvolume" ] && print_error "UUID of the root subvolume is not available"
136136

137137
# ---------- Boot partition ----------
@@ -147,7 +147,7 @@ fi
147147
# If /boot is not a Btrfs subvolume, reuse root subvol UUID
148148
boot_uuid_subvolume="$(
149149
btrfs subvolume show "${boot_directory}" 2>/dev/null | \
150-
awk -F':' '/^\s*UUID/ {gsub(/^[ \t]+/, "", $2); print $2; exit}'
150+
awk -F':' '/^[ \t]*UUID/ {gsub(/^[ \t]+/, "", $2); print $2; exit}'
151151
)"
152152
[ -z "$boot_uuid_subvolume" ] && boot_uuid_subvolume="$root_uuid_subvolume"
153153

0 commit comments

Comments
 (0)