PortValhalla/scripts/PopOS/linux-surface.sh

23 lines
765 B
Bash
Raw Normal View History

#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
2022-11-13 00:11:32 +00:00
sudo bash "$BASH_SOURCE"
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
2022-11-13 00:11:32 +00:00
apt update
2022-11-13 00:00:23 +00:00
apt install -y linux-image-surface linux-headers-surface iptsd libwacom-surface
2022-11-13 00:11:32 +00:00
systemctl enable iptsd
2022-11-13 00:11:32 +00:00
# Install DTX
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
fi