OSDN Git Service

Merge branch 'master' of https://github.com/instantos/instantARCH
[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     alsa-utils \
29     usbutils \
30     lightdm-gtk-greeter \
31     inetutils \
32     xdg-desktop-portal-gtk \
33     xorg-xinit \
34     firefox \
35     nitrogen \
36     lshw \
37     gxkb \
38     udiskie \
39     gedit \
40     ttf-liberation \
41     mpv \
42     gvfs-mtp \
43     unzip \
44     xdg-user-dirs-gtk \
45     noto-fonts-emoji \
46     accountsservice \
47     grub; do # install end
48
49     sleep 10
50     command -v reflector &&
51         reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist &&
52         pacman -Sy --noconfirm
53
54 done
55
56 # iso for postinstall guestadditions
57 if iroot guestadditions; then
58     echo "installing virtualbox guest addidions"
59     pacman -S --noconfirm --needed virtualbox-guest-iso
60 fi
61
62 # optional extra packages
63 if iroot packages; then
64     echo "installing extra packages"
65     PACKAGES="$(iroot packages)"
66     for t in ${PACKAGES[@]}; do
67         case "$t" in 
68         steam)
69             if command -v systemctl; then
70                 pacman -S --noconfirm --needed steam steam-native-runtime
71             else
72                 echo "steam is not available on artix"
73             fi
74             continue
75             ;;
76         vim)
77             pacman -S --noconfirm --needed vim vim-runtime
78             continue
79             ;;
80         virtualbox)
81             pacman -S --noconfirm --needed virtualbox-host-modules-arch virtualbox
82             continue
83             ;;
84
85         pacman -S --noconfirm --needed ${t}
86     done
87 fi
88
89 # artix packages
90 if command -v sv; then
91     echo "installing additional runit packages"
92     pacman -S --noconfirm --needed lightdm-runit networkmanager-runit
93 fi