OSDN Git Service

fix flatpak opener
[instantos/instantARCH.git] / depend / system.sh
1 #!/bin/bash
2
3 # installs basic dependencies not specific to instantOS
4
5 echo "installing additional system software"
6
7 pacman -Sy --noconfirm
8
9 while ! pacman -S xorg --noconfirm --needed; do
10     dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
11     iroot automirror && command -v reflector &&
12         reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
13
14 done
15
16 # the comments are used for parsing while building a live iso. Do not remove
17
18 # install begin
19 while ! pacman -S --noconfirm --needed \
20     sudo \
21     lightdm \
22     bash \
23     zsh \
24     xterm \
25     systemd-swap \
26     neofetch \
27     pulseaudio \
28     granite \
29     alsa-utils \
30     usbutils \
31     lightdm-gtk-greeter \
32     inetutils \
33     xdg-desktop-portal-gtk \
34     xorg-xinit \
35     firefox \
36     nitrogen \
37     lshw \
38     gxkb \
39     udiskie \
40     ntfs-3g \
41     gedit \
42     ttf-liberation \
43     ttf-joypixels \
44     mpv \
45     bc \
46     gvfs-mtp \
47     exfat-utils \
48     unzip \
49     engrampa \
50     unrar \
51     p7zip \
52     xdg-user-dirs-gtk \
53     noto-fonts-emoji \
54     xf86-input-evdev \
55     xf86-input-synaptics \
56     accountsservice \
57     cups \
58     system-config-printer \
59     gnome-font-viewer \
60     grub; do # install end
61
62     sleep 10
63     command -v reflector &&
64         reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist &&
65         pacman -Sy --noconfirm
66
67 done
68
69 # iso for postinstall guestadditions
70 if iroot guestadditions; then
71     echo "installing virtualbox guest addidions"
72     pacman -S --noconfirm --needed virtualbox-guest-iso
73 fi
74
75 # optional extra packages
76 if iroot packages &>/dev/null; then
77     echo "installing extra packages"
78     iroot packages | pacman -S --noconfirm --needed -
79 fi
80
81 if command -v systemctl; then
82     pacman -S --noconfirm --needed steam steam-native-runtime
83 fi
84
85 # artix packages
86 if command -v sv; then
87     echo "installing additional runit packages"
88     pacman -S --noconfirm --needed lightdm-runit networkmanager-runit
89 fi
90
91 # auto install processor microcode
92 if uname -m | grep '^x'; then
93     echo "installing microcode"
94     if lscpu | grep -i 'name' | grep -i 'amd'; then
95         echo "installing AMD microcode"
96         pacman -S --noconfirm --needed amd-ucode
97     elif lscpu | grep -i 'name' | grep -i 'intel'; then
98         echo "installing Intel microcode"
99         pacman -S --noconfirm --needed intel-ucode
100     fi
101 fi