-
Notifications
You must be signed in to change notification settings - Fork 389
Expand file tree
/
Copy path1-compile-setup.sh
More file actions
executable file
·70 lines (66 loc) · 2.53 KB
/
1-compile-setup.sh
File metadata and controls
executable file
·70 lines (66 loc) · 2.53 KB
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
#!/bin/sh -e
. ../common-script.sh
installDepend() {
## Check for dependencies.
DEPENDENCIES='tar tree multitail tldr trash-cli unzip cmake make jq'
printf "%b\n" "${YELLOW}Installing dependencies...${RC}"
case $PACKAGER in
pacman)
if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then
echo "[multilib]" | $ESCALATION_TOOL tee -a /etc/pacman.conf
echo "Include = /etc/pacman.d/mirrorlist" | $ESCALATION_TOOL tee -a /etc/pacman.conf
$ESCALATION_TOOL "$PACKAGER" -Syu
else
echo "Multilib is already enabled."
fi
$AUR_HELPER -S --needed --noconfirm "$DEPENDENCIES"
;;
apt|nala)
COMPILEDEPS='build-essential'
$ESCALATION_TOOL "$PACKAGER" update
$ESCALATION_TOOL dpkg --add-architecture i386
$ESCALATION_TOOL "$PACKAGER" update
$ESCALATION_TOOL "$PACKAGER" install -y $DEPENDENCIES $COMPILEDEPS
;;
dnf)
COMPILEDEPS='@development-tools'
$ESCALATION_TOOL "$PACKAGER" update
$ESCALATION_TOOL "$PACKAGER" config-manager --set-enabled powertools
$ESCALATION_TOOL "$PACKAGER" install -y "$DEPENDENCIES" $COMPILEDEPS
$ESCALATION_TOOL "$PACKAGER" install -y glibc-devel.i686 libgcc.i686
;;
zypper)
COMPILEDEPS='patterns-devel-base-devel_basis'
$ESCALATION_TOOL "$PACKAGER" refresh
$ESCALATION_TOOL "$PACKAGER" --non-interactive install "$DEPENDENCIES" $COMPILEDEPS
$ESCALATION_TOOL "$PACKAGER" --non-interactive install libgcc_s1-gcc7-32bit glibc-devel-32bit
;;
*)
$ESCALATION_TOOL "$PACKAGER" install -y $DEPENDENCIES # Fixed bug where no packages found on debian-based
;;
esac
}
install_additional_dependencies() {
case $(command -v apt || command -v zypper || command -v dnf || command -v pacman) in
*apt)
# Add additional dependencies for apt if needed
;;
*zypper)
# Add additional dependencies for zypper if needed
;;
*dnf)
# Add additional dependencies for dnf if needed
;;
*pacman)
# Add additional dependencies for pacman if needed
;;
*)
# Add additional dependencies for other package managers if needed
;;
esac
}
checkEnv
checkAURHelper
checkEscalationTool
installDepend
install_additional_dependencies