Initial commit: SkyOS source code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-07-23 12:14:34 -04:00
commit e641720a3c
30 files changed
+5836

No files matched your search

Executable
+94
View File
@@ -0,0 +1,94 @@
#!/usr/bin/env bash
# SkyOS ISO builder — run this on your Mac to produce a bootable ISO.
# Requires: Docker Desktop (https://docker.com/products/docker-desktop)
#
# Usage: ./build-iso.sh
# Output: dist/skyos-<date>.iso
set -euo pipefail
REPO="$(cd "$(dirname "$0")" && pwd)"
DIST="$REPO/dist"
IMAGE="skyos-builder"
ISO_TAG="skyos-$(date +%Y%m%d)"
# ── preflight ─────────────────────────────────────────────────────────
if ! command -v docker &>/dev/null; then
echo ""
echo " Docker is not installed."
echo ""
echo " Install Docker Desktop for Mac:"
echo " https://www.docker.com/products/docker-desktop/"
echo ""
echo " After installing, open Docker Desktop once to let it start,"
echo " then re-run this script."
exit 1
fi
if ! docker info &>/dev/null; then
echo ""
echo " Docker is installed but not running."
echo " Open Docker Desktop and wait for it to start, then re-run."
exit 1
fi
echo ""
echo "┌─────────────────────────────────────────────┐"
echo "│ SkyOS ISO Builder │"
echo "│ Building a BeOS-inspired Linux desktop... │"
echo "└─────────────────────────────────────────────┘"
echo ""
# ── build the builder image ───────────────────────────────────────────
echo "Step 1/3: Building Docker image (downloads ~600MB Arch base, once)"
echo " This will be fast on subsequent runs."
echo ""
docker build \
--platform linux/amd64 \
-t "$IMAGE" \
-f "$REPO/iso/docker/Dockerfile" \
"$REPO"
# ── run the ISO build inside the container ────────────────────────────
echo ""
echo "Step 2/3: Building ISO inside Arch Linux container..."
echo " (5–15 min depending on internet speed and CPU)"
echo ""
mkdir -p "$DIST"
docker run \
--rm \
--privileged \
--platform linux/amd64 \
--security-opt seccomp=unconfined \
-v "$DIST:/dist" \
-e DIST=/dist \
"$IMAGE"
# ── rename with date tag ──────────────────────────────────────────────
echo ""
echo "Step 3/3: Finalizing..."
ISO="$(find "$DIST" -name "skyos*.iso" | head -1)"
if [[ -z "$ISO" ]]; then
echo "ERROR: ISO not found in $DIST — check the build output above."
exit 1
fi
FINAL="$DIST/$ISO_TAG.iso"
mv "$ISO" "$FINAL"
SIZE="$(du -sh "$FINAL" | cut -f1)"
echo ""
echo "┌─────────────────────────────────────────────┐"
echo "│ Done! │"
echo "│ │"
echo "│ ISO: dist/$ISO_TAG.iso"
echo "│ Size: $SIZE"
echo "│ │"
echo "│ Flash to USB: │"
echo "│ sudo dd if=$FINAL of=/dev/diskN bs=4m │"
echo "│ (replace /dev/diskN with your USB drive) │"
echo "│ │"
echo "│ Or use Balena Etcher (GUI): │"
echo "│ https://etcher.balena.io │"
echo "└─────────────────────────────────────────────┘"
echo ""