2023-04-04 15:16:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
|
|
|
|
|
|
|
. "../../Software/yay/install.sh";
|
|
|
|
|
|
|
|
curl -s https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \
|
|
|
|
| sudo pacman-key --add -;
|
|
|
|
|
|
|
|
sudo pacman-key --finger 56C464BAAC421453;
|
|
|
|
sudo pacman-key --lsign-key 56C464BAAC421453;
|
|
|
|
|
2023-04-05 08:01:31 +00:00
|
|
|
pacmanConf="/etc/pacman.conf";
|
|
|
|
|
2023-05-23 06:43:51 +00:00
|
|
|
retry() {
|
|
|
|
retryCount="$1";
|
|
|
|
command="${@:2}";
|
|
|
|
exitCode=0;
|
|
|
|
|
|
|
|
for i in $(seq 1 $retryCount);
|
|
|
|
do
|
|
|
|
eval "$command" && {
|
|
|
|
exitCode=0;
|
|
|
|
break;
|
|
|
|
};
|
|
|
|
exitCode="$?";
|
|
|
|
done;
|
|
|
|
}
|
|
|
|
|
2023-04-05 08:01:31 +00:00
|
|
|
if ! grep "^\[linux-surface\]$" "$pacmanConf"
|
2023-04-06 11:40:43 +00:00
|
|
|
then
|
|
|
|
{
|
|
|
|
echo "";
|
|
|
|
echo "[linux-surface]";
|
|
|
|
echo "Server = https://pkg.surfacelinux.com/arch/";
|
|
|
|
} | sudo tee -a "$pacmanConf" > /dev/null;
|
|
|
|
fi;
|
2023-04-04 15:16:19 +00:00
|
|
|
|
2023-05-23 06:43:51 +00:00
|
|
|
retry 5 sudo pacman --noconfirm -Syu;
|
2023-04-04 15:16:19 +00:00
|
|
|
|
2023-05-23 06:43:51 +00:00
|
|
|
retry 5 sudo pacman --noconfirm -Sy \
|
2023-04-04 15:16:19 +00:00
|
|
|
intel-ucode \
|
|
|
|
linux-surface \
|
|
|
|
linux-surface-headers \
|
2023-05-06 23:36:04 +00:00
|
|
|
linux-surface-secureboot-mok \
|
2023-04-04 15:16:19 +00:00
|
|
|
iptsd \
|
|
|
|
intel-ucode \
|
2024-03-23 16:21:32 +00:00
|
|
|
linux-firmware-marvell \
|
|
|
|
;
|
2023-04-04 15:16:19 +00:00
|
|
|
|
|
|
|
sudo grub-mkconfig -o /boot/grub/grub.cfg;
|
2023-04-07 00:10:45 +00:00
|
|
|
yes | yay --answerclean=None --answerdiff=None -Syu libwacom-surface;
|
2023-04-04 15:16:19 +00:00
|
|
|
|
2023-04-05 08:21:12 +00:00
|
|
|
. "./camera.sh";
|
|
|
|
|
2023-05-03 19:44:40 +00:00
|
|
|
popd > /dev/null;
|