#!/bin/bash set -e echo "Installing musl-tools and g++..." sudo apt update sudo apt install -y musl-tools g++ # Check if musl-g++ exists, otherwise create a symlink echo "Checking for musl-g++..." if ! command -v musl-g++ >/dev/null 2>&1; then if [ -f /usr/bin/musl-g++ ]; then echo "musl-g++ already present." elif [ -f /usr/bin/musl-gcc ]; then echo "Creating musl-g++ symlink to musl-gcc..." sudo ln -sf /usr/bin/musl-gcc /usr/bin/musl-g++ else echo "musl-gcc not found. Please check your musl-tools installation." exit 1 fi else echo "musl-g++ is available." fi echo "musl-g++ installation complete."