From 6c6b9ab7deb607aa985048ea170428729afc07a9 Mon Sep 17 00:00:00 2001 From: Pernat1y Date: Sat, 26 Jan 2019 16:19:45 +0200 Subject: [PATCH] Install packages for Arch Linux --- install.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index ea07f59..8d93033 100755 --- a/install.sh +++ b/install.sh @@ -18,9 +18,19 @@ ver="0.3" # the sources during kernel updates marker="0.0.0" -apt update -apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel -apt-get -y install dkms git i2c-tools libasound2-plugins +# update and install required packages +which apt &>/dev/null +if [[ $? -eq 0 ]]; then + apt update -y + apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel + apt-get -y install dkms git i2c-tools libasound2-plugins +fi + +# Arch Linux +which pacman &>/dev/null +if [[ $? -eq 0 ]]; then + pacman -Syu --needed git gcc automake make dkms linux-raspberrypi-headers i2c-tools +fi # locate currently installed kernels (may be different to running kernel if # it's just been updated)