Only install xone if necessary

This commit is contained in:
Manuel Thalmann 2024-03-07 21:59:24 +01:00
parent dba9efcbad
commit b3d809c6ae

View file

@ -4,8 +4,13 @@ sudo pacman --noconfirm -Syu cabextract;
contextRoot="$(mktemp -d)";
pushd "$contextRoot" > /dev/null;
git clone "https://github.com/dlundqvist/xone.git" "$contextRoot";
sudo "$contextRoot/install.sh" --release;
yes "" | sudo xone-get-firmware.sh;
if lsmod | grep xone > /dev/null;
then
git clone "https://github.com/dlundqvist/xone.git" "$contextRoot";
sudo "$contextRoot/install.sh" --release;
yes "" | sudo xone-get-firmware.sh;
fi;
popd;
rm -rf "$contextRoot" > /dev/null;