Skip to content

Commit

Permalink
Fix zram module package on Ubuntu 24 (#120)
Browse files Browse the repository at this point in the history
Fixes #119

Signed-off-by: nan mu <[email protected]>
  • Loading branch information
nan-mu authored Sep 16, 2024
1 parent 61a6410 commit e1ebd32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ elif ! dpkg -s 'gcc' 'meson' 'libc6-dev' &> /dev/null; then
fi

UBUNTU_VERSION="$(grep -o '^VERSION_ID=.*$' /etc/os-release | cut -d'=' -f2 | tr -d '"')"
if [[ $OS == "ubuntu" ]] && [[ $(bc -l <<< "$UBUNTU_VERSION >= 21.10") -eq 1 ]]; then
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 "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)"
if ! dpkg -s 'linux-modules-extra-raspi' &> /dev/null; then
apt-get install --yes linux-modules-extra-raspi || exit 1
Expand Down

0 comments on commit e1ebd32

Please sign in to comment.