]> gitweb.morketsmerke.org Git - immudex.git/commitdiff
Dostosowanie addonu baytrail_sound do nowych wymagań addonów.
authorxf0r3m <jakubstasinski@protonmail.com>
Tue, 2 Jan 2024 09:32:30 +0000 (10:32 +0100)
committerxf0r3m <jakubstasinski@protonmail.com>
Tue, 2 Jan 2024 09:32:30 +0000 (10:32 +0100)
addons/baytrail_sound

index 27a4cb3d0514443cf74f9d131ab6d13cb1d88b95..f6d64290cac7fd77aecc34cdb1c19a810de7589e 100644 (file)
@@ -1,42 +1,21 @@
 #!/bin/bash
 
-if [ "$1" ]; then
-  case $1 in
-    "install") echo "Installation $(basename $0) addon...";
-                if [ ! -d /boot ]; then
-                  mkdir /boot;
-                       apt purge linux-image* --purge -y;
-                       apt install linux-image-amd64;
-                fi
+set -e
 
-                cp -vv /etc/apt/sources.list /etc/apt/sources.list.d/baytrail-sound.list;
-                sed -e 's/main/contrib non-free non-free-firmware/g' -i /etc/apt/sources.list.d/baytrail-sound.list;
+if [ ! -d /boot ]; then
+  mkdir /boot;
+       apt purge linux-image* --purge -y;
+       apt install linux-image-amd64;
+fi
 
-                apt update;
-                apt install firmware-sof-signed firmware-intel-sound;
-                if [ $? -eq 0 ]; then success=0; else success=1; fi
-                rm /etc/apt/sources.list.d/baytrail-sound.list;
-                apt update;
+cp -vv /etc/apt/sources.list /etc/apt/sources.list.d/baytrail-sound.list;
+sed -e 's/main/contrib non-free non-free-firmware/g' -i /etc/apt/sources.list.d/baytrail-sound.list;
 
-                apt-get autoclean;
-                apt-get autoremove;
-                apt-get clean;
-                apt-get clean;
+apt update;
+apt install firmware-sof-signed firmware-intel-sound;
+rm /etc/apt/sources.list.d/baytrail-sound.list;
+apt update;
 
-                if [ $success -eq 0 ]; then
-                  echo "Installation $(basename $0) addon...[ OK ]";
-                fi;;
-    "remove") echo "Removing $(basename $0) addon...";
-                apt remove -y firmware-sof-signed firmware-intel-sound;
-                if [ $? -eq 0 ]; then success=0; else success=1; fi
-                apt-get autoclean;
-                apt-get autoremove -y;
-                apt-get clean;
-                if [ $success -eq 0 ]; then
-                  echo "Removing $(basename $0) addon...[ OK ]";
-                fi;;
-  esac
-else
-  echo "Internal error: action must be given.";
-  exit 1;
-fi
+apt-get autoclean;
+apt-get autoremove;
+apt-get clean;