#!/bin/bash
echo "🌍 Detecting your operating system..."

OS_TYPE=$(uname | tr '[:upper:]' '[:lower:]')

if [[ "$OS_TYPE" == "linux" ]]; then
echo "🐧 Linux detected. Running installer..."
curl -sL https://get.odac.run/?os=linux | sudo bash

elif [[ "$OS_TYPE" == "darwin" ]]; then
echo "🍎 macOS detected. Running installer..."
curl -sL https://get.odac.run/?os=macos | sudo bash

elif [[ "$OS" == "Windows_NT" ]]; then
echo "🪟 Windows detected. Running installer..."
powershell -ExecutionPolicy Bypass -Command "iwr https://get.odac.run/?os=windows -OutFile odac_install.ps1; ./odac_install.ps1"

else
echo "❌ Unsupported OS: $OS_TYPE"
exit 1
fi