Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
linux: Fix regex patterns for detecting Fedora in script/linux (#22611)
Hossein Khosravi8c253af451ee
diff --git a/script/linux b/script/linuxindex 5336f8f3697..650c1cfbbb4 100755--- a/script/linux+++ b/script/linux@@ -86,7 +86,7 @@ if [[ -n $dnf ]] || [[ -n $yum ]]; then)# perl used for building openssl-sys crate. See: https://docs.rs/openssl/latest/openssl/# openbsd-netcat is unavailable in RHEL8/9 (and nmap-ncat doesn't support sockets)- if grep -qP '^ID="(fedora)' /etc/os-release; then+ if grep -qP '^ID="?(fedora)' /etc/os-release; thendeps+=(perl-FindBinperl-IPC-Cmd@@ -95,20 +95,20 @@ if [[ -n $dnf ]] || [[ -n $yum ]]; thennetcatmold)- elif grep -qP '^ID="(rhel|rocky|alma|centos|ol)' /etc/os-release; then+ elif grep -qP '^ID="?(rhel|rocky|alma|centos|ol)' /etc/os-release; thendeps+=( perl-interpreter )fi# gcc-c++ is g++ on RHEL8 and 8.x clones- if grep -qP '^ID="(rhel|rocky|alma|centos|ol)' /etc/os-release \- && grep -qP '^VERSION_ID="8' /etc/os-release; then+ if grep -qP '^ID="?(rhel|rocky|alma|centos|ol)' /etc/os-release \+ && grep -qP '^VERSION_ID="?(8)' /etc/os-release; thendeps+=( gcc-c++ )elsedeps+=( g++ )fi# libxkbcommon-x11-devel is in a non-default repo on RHEL 8.x/9.x (except on AmazonLinux)- if grep -qP '^VERSION_ID="(8|9)' /etc/os-release && grep -qP '^ID="(rhel|rocky|centos|alma|ol)' /etc/os-release; then+ if grep -qP '^VERSION_ID="?(8|9)' /etc/os-release && grep -qP '^ID="?(rhel|rocky|centos|alma|ol)' /etc/os-release; then$maysudo dnf install -y 'dnf-command(config-manager)'if grep -qP '^PRETTY_NAME="(AlmaLinux 8|Rocky Linux 8)' /etc/os-release; then$maysudo dnf config-manager --set-enabled powertools