This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup-phase-3.sh
executable file
·51 lines (39 loc) · 1.62 KB
/
setup-phase-3.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
#!/bin/bash
source ./env.sh
source ./helper-functions.sh
if [[ -z "$prefix" ]]; then
echor "No prefix found inside distrobox, aborting"
exit 1
fi
echor "Phase 3"
cd "$prefix" || {
echor "Couldn't go into installation folder on phase 3, aborting."
exit 1
}
sudo pacman -q --noprogressbar -Syu jq --noconfirm || exit 1
GPU=$(read_json_field gpu specs.json || exit 1)
if [[ "$GPU" != "nvidia" ]] && [[ "$GPU" != "amd" ]] && [[ "$GPU" != "intel" ]]; then
echor "Something has gone wrong with specs GPU reading, aborting install"
exit 1
fi
AUDIO_SYSTEM=$(read_json_field audio specs.json || exit 1)
if [[ "$AUDIO_SYSTEM" != "pipewire" ]] && [[ "$GPU" != "pulse" ]]; then
echor "Something has gone wrong with specs AUDIO_SYSTEM reading, aborting install"
exit 1
fi
# Renaming xdg-open from container because it will run host applications (like steam) instead of internal ones
sudo mv /usr/local/bin/xdg-open /usr/local/bin/xdg-open2
# Setting up arch
echog "Setting up repositories"
echo "[multilib]" | sudo tee -a /etc/pacman.conf
echo "Include = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf
echog "Setting up locales"
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
sudo pacman-key --init || exit 1
echo "LANG=en_US.UTF-8" | sudo tee /etc/locale.conf
echo "LC_ALL=en_US.UTF-8" | sudo tee /etc/locale.conf
echo "export LANG=en_US.UTF-8 #alvr-distrobox" | tee -a ~/.bashrc
echo "export LC_ALL=en_US.UTF-8 #alvr-distrobox" | tee -a ~/.bashrc
sudo pacman -q --noprogressbar -Syu glibc lib32-glibc xdg-utils qt5-tools qt5-multimedia at-spi2-core lib32-at-spi2-core tar wget --noconfirm || exit 1
cd ..
exit 0