#!/bin/bash
# Setup script for CubeCactusOS development environment
echo "================================"
echo "CubeCactusOS Setup Script"
echo "================================"
echo ""
# Detect OS
if [[ "$OSTYPE" == "darwin"* ]]; then
OS="macOS"
PKG_MANAGER="brew"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
OS="Linux"
PKG_MANAGER="apt-get"
else
echo "Unsupported operating system: $OSTYPE"
exit 1
fi
echo "Detected OS: $OS"
echo ""
# Check for required tools
check_tool() {
if command -v $1 &> /dev/null; then
echo "✓ $1 is installed"
return 0
else
echo "✗ $1 is not installed"
return 1
fi
}
echo "Checking prerequisites..."
check_tool gcc
check_tool make
check_tool git
check_tool qemu-system-i386
echo ""
echo "================================"
echo "Next Steps:"
echo "================================"
echo ""
echo "1. Clone MINIX3 source code:"
echo " git clone https://github.com/Stichting-MINIX-Research-Foundation/minix.git minix3-source"
echo ""
echo "2. Review the setup guide:"
echo " cat os/SETUP.md"
echo ""
echo "3. Build kernel components:"
echo " make -f Makefile.os os-build"
echo ""
echo "4. For a complete bootable OS, follow os/SETUP.md"
echo ""
echo "Happy OS development!"