Use consistent bash5 style for conditionals and quoting
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
# This prevents NVMe drives from failing to wake from sleep properly
|
||||
MACBOOK_MODEL=$(cat /sys/class/dmi/id/product_name 2>/dev/null || true)
|
||||
|
||||
if [[ "$MACBOOK_MODEL" =~ MacBook(8,1|9,1|10,1)|MacBookPro13,[123]|MacBookPro14,[123] ]]; then
|
||||
if [[ $MACBOOK_MODEL =~ MacBook(8,1|9,1|10,1)|MacBookPro13,[123]|MacBookPro14,[123] ]]; then
|
||||
echo "Detected MacBook model: $MACBOOK_MODEL"
|
||||
|
||||
NVME_DEVICE="/sys/bus/pci/devices/0000:01:00.0/d3cold_allowed"
|
||||
|
||||
if [[ -f "$NVME_DEVICE" ]]; then
|
||||
if [[ -f $NVME_DEVICE ]]; then
|
||||
echo "Applying NVMe suspend fix..."
|
||||
|
||||
cat <<EOF | sudo tee /etc/systemd/system/omarchy-nvme-suspend-fix.service >/dev/null
|
||||
|
||||
Reference in New Issue
Block a user