2024-07-15 20:00:04 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-08-15 07:13:56 +01:00
|
|
|
. ../common-script.sh
|
2024-07-28 16:32:05 +01:00
|
|
|
|
2024-07-13 02:57:34 +01:00
|
|
|
installDepend() {
|
|
|
|
## Check for dependencies.
|
|
|
|
DEPENDENCIES='tar tree multitail tldr trash-cli unzip cmake make jq'
|
2024-09-12 21:14:50 +01:00
|
|
|
printf "%b\n" "${YELLOW}Installing dependencies...${RC}"
|
2024-09-17 13:23:23 +01:00
|
|
|
case "$PACKAGER" in
|
2024-07-13 02:57:34 +01:00
|
|
|
pacman)
|
|
|
|
if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then
|
2024-09-19 01:03:32 +01:00
|
|
|
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
|
2024-07-13 02:57:34 +01:00
|
|
|
else
|
2024-09-17 03:44:20 +01:00
|
|
|
printf "%b\n" "${GREEN}Multilib is already enabled.${RC}"
|
2024-07-13 02:57:34 +01:00
|
|
|
fi
|
2024-09-29 09:47:28 +01:00
|
|
|
"$AUR_HELPER" -S --needed --noconfirm $DEPENDENCIES
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
2024-07-30 21:29:36 +01:00
|
|
|
apt-get|nala)
|
2024-07-13 02:57:34 +01:00
|
|
|
COMPILEDEPS='build-essential'
|
2024-09-19 01:03:32 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" update
|
|
|
|
"$ESCALATION_TOOL" dpkg --add-architecture i386
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" update
|
2024-09-29 09:47:28 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES $COMPILEDEPS
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
|
|
|
dnf)
|
|
|
|
COMPILEDEPS='@development-tools'
|
2024-09-19 01:03:32 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" update
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" config-manager --set-enabled powertools
|
2024-09-29 09:47:28 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES $COMPILEDEPS
|
2024-09-19 01:03:32 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y glibc-devel.i686 libgcc.i686
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
|
|
|
zypper)
|
|
|
|
COMPILEDEPS='patterns-devel-base-devel_basis'
|
2024-09-19 01:03:32 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" refresh
|
2024-09-29 09:47:28 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install $DEPENDENCIES $COMPILEDEPS
|
2024-09-19 01:03:32 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install libgcc_s1-gcc7-32bit glibc-devel-32bit
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
2024-10-13 02:42:34 +01:00
|
|
|
apk)
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" add build-base multitail tar tree trash-cli unzip cmake jq
|
|
|
|
;;
|
2024-07-13 02:57:34 +01:00
|
|
|
*)
|
2024-09-29 09:47:28 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-09-06 00:23:24 +01:00
|
|
|
checkAURHelper
|
2024-08-23 14:12:47 +01:00
|
|
|
checkEscalationTool
|
2024-09-19 17:53:04 +01:00
|
|
|
installDepend
|