-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
42 lines (34 loc) · 1.12 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
if [ $(id -u) -ne 0 ]
then echo Please run this script as root or using doas!
exit
fi
pkg install doas; sysrc powerd_enable="YES"; sysrc powerd_flags="-a hiadaptive"
echo "permit persist :wheel as root" >> /usr/local/etc/doas.conf
clear
echo "CHOOSE A GPU:"
echo "1. nvidia"
echo "2. amd"
echo "3. intel"
echo "4. old-amd"
read -p "GPU: " answer
answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]')
if [ $answer = nvidia ] ; then
pkg install nvidia-driver; sysrc kld_list+=nvidia-modeset; break
elif [ $answer = amd ] ; then
pkg install drm-kmod; sysrc kld_list+=amdgpu; break
elif [ $answer = intel ] ; then
pkg install drm-kmod; sysrc kld_list+=i915kms; break
elif [ $answer = old-amd ] ; then
pkg install drm-kmod; sysrc kld_list+=radeonkms; break
elif [ $answer = 1 ] ; then
pkg install nvidia-driver; sysrc kld_list+=nvidia-modeset; break
elif [ $answer = 2 ] ; then
pkg install drm-kmod; sysrc kld_list+=amdgpu; break
elif [ $answer = 3 ] ; then
pkg install drm-kmod; sysrc kld_list+=i915kms; break
elif [ $answer = 4 ] ; then
pkg install drm-kmod; sysrc kld_list+=radeonkms; break
else
echo "GPU not found!"
fi