#!/bin/sh # Universal Dependency Installer for RV64 Development # Compatible with bash and zsh set -e echo "Checking system environment..." if [ -f /etc/arch-release ]; then echo "Arch Linux detected. Using pacman..." sudo pacman -Syu --needed riscv64-linux-gnu-binutils qemu-user-static just elif [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then echo "Debian/Ubuntu detected. Using apt..." sudo apt update sudo apt install -y binutils-riscv64-linux-gnu qemu-user-static just elif [ -f /etc/fedora-release ]; then echo "Fedora detected. Using dnf..." sudo dnf install -y binutils-riscv64-linux-gnu qemu-user-static just else echo "Unsupported distribution. Please install 'riscv64-binutils', 'qemu-user', and 'just' manually." exit 1 fi echo "Setup complete. You can now use 'just run' to assemble and execute your code."