-
Notifications
You must be signed in to change notification settings - Fork 0
/
pacman.sh
86 lines (85 loc) · 4 KB
/
pacman.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
source arrtx/install.conf
/usr/bin/runuser -u ${usrname} -- sudo pacman -Sy --noconfirm --needed - < arrtx/pkgs/user-pkgs.txt
/usr/bin/runuser -u ${usrname} -- sudo pacman -Sy --noconfirm --needed - < arrtx/pkgs/user-pkgs.txt
/usr/bin/runuser -u ${usrname} -- sudo pacman -Sy --noconfirm --needed - < arrtx/pkgs/user-pkgs.txt
/usr/bin/runuser -u ${usrname} -- sudo pacman -Sy --noconfirm --needed - < arrtx/pkgs/user-pkgs.txt
/usr/bin/runuser -u ${usrname} -- sudo pacman -Sy --noconfirm --needed - < arrtx/pkgs/user-pkgs.txt
sudo cp -rf arrtx/xorg.conf /etc/X11/
sh arrtx/game.sh
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# determine processor type and install microcode
proc_type=$(lscpu)
if grep -E "GenuineIntel" <<< ${proc_type}; then
echo "Installing Intel microcode"
pacman -S --noconfirm intel-ucode
proc_ucode=intel-ucode.img
elif grep -E "AuthenticAMD" <<< ${proc_type}; then
echo "Installing AMD microcode"
pacman -S --noconfirm amd-ucode
proc_ucode=amd-ucode.img
fi
# Graphics Drivers find and install
gpu_type=$(lspci)
if lspci | grep -E "NVIDIA|GeForce" <<< ${gpu_type}; then
echo "--------------------------------------------------------"
echo ""
echo " INSTALLING NVIDIA GRAPHICS DRIVER"
echo ""
echo "--------------------------------------------------------"
pacman -Sy --noconfirm --needed - < arrtx/pkgs/nvidia-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/nvidia-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/nvidia-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/nvidia-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/nvidia-pkgs.txt
elif lspci | grep 'VGA' | grep -E "Radeon|AMD"; then
echo "--------------------------------------------------------"
echo ""
echo " INSTALLING AMD GRAPHICS DRIVER"
echo ""
echo "--------------------------------------------------------"
pacman -Sy --noconfirm --needed - < arrtx/pkgs/amd-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/amd-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/amd-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/amd-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/amd-pkgs.txt
elif lspci grep -E "Integrated Graphics Controller" <<< ${gpu_type}; then
echo "--------------------------------------------------------"
echo ""
echo " INSTALLING INTEL GRAPHICS DRIVER"
echo ""
echo "--------------------------------------------------------"
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
elif grep -E "Intel Corporation UHD" <<< ${gpu_type}; <<< ${gpu_type}; then
echo "--------------------------------------------------------"
echo ""
echo " INSTALLING INTEL GRAPHICS DRIVER"
echo ""
echo "--------------------------------------------------------"
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
pacman -Sy --noconfirm --needed - < arrtx/pkgs/intel-pkgs.txt
fi
case $boot in
1)
pacman -Sy grub os-prober --noconfirm
grub-install --target=i386-pc /dev/"${drive}"
grub-mkconfig -o /boot/grub/grub.cfg
;;
2)
pacman -Sy grub efibootmgr os-prober --noconfirm
grub-install --target=x86_64-efi --efi-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg
;;
3)
pacman -Sy grub efibootmgr os-prober --noconfirm
grub-install --target=i386-pc --boot-directory=/boot /dev/"${drive}"
grub-install --target=x86_64-efi --efi-directory=/boot --boot-directory=/boot --removable --recheck
grub-mkconfig -o /boot/grub/grub.cfg
;;
esac