From f3f75f0749635786e49d5c192bc14a3e4ca54bf1 Mon Sep 17 00:00:00 2001 From: nan mu Date: Thu, 12 Sep 2024 14:48:14 +0800 Subject: [PATCH] Fix ShellCheck hint --- install.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.bash b/install.bash index 21602b1..4bd00aa 100755 --- a/install.bash +++ b/install.bash @@ -40,8 +40,8 @@ fi UBUNTU_VERSION="$(grep -o '^VERSION_ID=.*$' /etc/os-release | cut -d'=' -f2 | tr -d '"')" if [[ $OS == "ubuntu" ]] && [[ $(bc -l <<< "$UBUNTU_VERSION >= 23.10") -eq 1 ]]; then echo "Installing zram module package for Ubuntu (linux-modules)" - if ! dpkg -s linux-modules-$(uname -a | awk '{print $3}') &> /dev/null; then - apt-get install --yes dpkg -s linux-modules-$(uname -a | awk '{print $3}') || exit 1 + if ! dpkg -s "linux-modules-$(uname -a | awk '{print $3}')" &> /dev/null; then + apt-get install --yes "linux-modules-$(uname -a | awk '{print $3}')" || exit 1 fi elif [[ $OS == "ubuntu" ]] && [[ $(bc -l <<< "$UBUNTU_VERSION >= 21.10") -eq 1 ]]; then echo "Installing zram module package for Ubuntu (linux-modules-extra-raspi)"