Combine ifs

This commit is contained in:
Ryan Hughes
2025-09-21 18:12:21 -04:00
parent 4d50c8bd33
commit 607915a5d1

View File

@@ -2,13 +2,10 @@
# - BCM4360 (20132015)
# - BCM4331 (2012, early 2013)
# Grab the PCI ID string once
pci_info=$(lspci -nnv)
if echo "$pci_info" | grep -q "14e4:43a0" && echo "$pci_info" | grep -q "106b:"; then
echo "Apple BCM4360 detected"
sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers
elif echo "$pci_info" | grep -q "14e4:4331" && echo "$pci_info" | grep -q "106b:"; then
echo "Apple BCM4331 detected"
if echo "$pci_info" | grep -q "106b:" &&
(echo "$pci_info" | grep -q "14e4:43a0" || echo "$pci_info" | grep -q "14e4:4331"); then
echo "Apple BCM4360 / BCM4331 detected"
sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers
fi