Skip to content

Commit 9809ff3

Browse files
committed
[ros2-setup] fix grep
1 parent 81ebdfe commit 9809ff3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ros2-setup/install.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ then
2525
needs_enabling_universe=false
2626
fi
2727
else
28-
if ! grep -h ^deb /etc/apt/sources.list 2>/dev/null | grep "${ubuntu_name} (?:[a-z ]*(?:[a-z]+(?: [a-z]+)*)) universe" -q
28+
if ! grep -h ^deb /etc/apt/sources.list 2>/dev/null | grep -P "${ubuntu_name}[a-z\-]* (?:[a-z ]*(?:[a-z]+(?: [a-z]+)*)) universe" -q
2929
then
3030
tue-install-debug "No universe found in the sources.list, going to enable the universe repository"
3131
else
3232
tue-install-debug "Universe found in the sources.list, no need to enable it"
33+
needs_enabling_universe=false
3334
fi
3435
fi
3536

0 commit comments

Comments
 (0)