PortValhalla/scripts/Devices/Surface/LinuxSurface/install.sh

23 lines
783 B
Bash
Raw Normal View History

#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE";
2022-11-13 00:11:32 +00:00
else
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \
| gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg;
2022-11-13 00:11:32 +00:00
echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" \
| sudo tee /etc/apt/sources.list.d/linux-surface.list;
apt update;
apt install -y linux-image-surface linux-headers-surface iptsd libwacom-surface;
systemctl enable iptsd;
2022-11-13 00:11:32 +00:00
# Install DTX
2023-01-23 15:11:51 +00:00
package="$(mktemp)";
wget https://github.com/linux-surface/surface-dtx-daemon/releases/download/v0.3.3-2/surface-dtx-daemon_0.3.3-2_amd64.deb -O "$package";
dpkg -i "$package";
rm -f "$package";
2022-11-13 00:11:32 +00:00
fi