Fedora Setup

This commit is contained in:
MangoPig
2026-05-29 15:57:17 +01:00
parent d5bcda270d
commit 3f753d0dd0
8 changed files with 338 additions and 98 deletions

View File

@@ -9,21 +9,30 @@ YELLOW='\033[1;33m'
GREEN='\033[1;32m'
NC='\033[0m'
if [ -f /etc/os-release ]; then
. /etc/os-release
OS=$ID
fi
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$SCRIPT_DIR/lib/distro.sh"
echo -e "${BLUE} LOG:${YELLOW} Setting up C++ Tooling (LLVM/Clang)...${NC}"
if [ "$OS" == "arch" ] || [ "$OS" == "manjaro" ]; then
sudo pacman -S --noconfirm --needed clang cmake ninja lldb gdb
elif [ "$OS" == "ubuntu" ] || [ "$OS" == "debian" ]; then
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y clang cmake ninja-build lldb gdb
if is_arch_family; then
CPP_PACKAGES=(clang cmake ninja lldb gdb)
elif is_debian_family || is_fedora_family; then
CPP_PACKAGES=(clang cmake ninja-build lldb gdb)
else
echo -e "${RED} ERROR:${NC} Unsupported OS: $OS"
exit 1
fi
install_status=0
install_packages "${CPP_PACKAGES[@]}" || install_status=$?
if [ "$install_status" -eq 42 ]; then
exit 0
elif [ "$install_status" -ne 0 ]; then
exit "$install_status"
fi
echo -e "${GREEN} SUCCESS:${NC} C++ Environment Ready."
echo -e " - Compiler: $(clang --version | head -n 1)"
echo -e " - Builder: $(cmake --version | head -n 1)"
echo -e " - Debugger: $(lldb --version | head -n 1)"
echo -e " - Debugger: $(lldb --version | head -n 1)"