#!/usr/bin/env bash # Install (or update) Nibelung — the latest signed macOS build. # # curl -fsSL https://get.nibelung.cloud | bash # # Version-agnostic: always resolves the current release from latest.json, so this # one URL never needs changing. Ad-hoc signed → we strip the quarantine flag so it # opens without the Gatekeeper prompt. set -euo pipefail BASE="https://get.nibelung.cloud" APP="/Applications/Nibelung.app" command -v python3 >/dev/null 2>&1 || { echo "python3 required"; exit 1; } echo "→ Resolving latest Nibelung release…" VER="$(curl -fsSL "$BASE/latest.json" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])')" TMP="$(mktemp -d)" DMG="$TMP/Nibelung.dmg" trap 'rm -rf "$TMP"' EXIT echo "→ Downloading Nibelung $VER…" curl -fL --progress-bar -o "$DMG" "$BASE/Nibelung_${VER}_universal.dmg" MP="$(hdiutil attach "$DMG" -nobrowse -noautoopen | grep -o '/Volumes/.*' | head -1)" [ -d "$MP/Nibelung.app" ] || { echo "Nibelung.app not found in dmg"; hdiutil detach "$MP" -quiet || true; exit 1; } rm -rf "$APP" cp -R "$MP/Nibelung.app" /Applications/ hdiutil detach "$MP" -quiet xattr -dr com.apple.quarantine "$APP" 2>/dev/null || true # ad-hoc signed → skip Gatekeeper killall Dock Finder 2>/dev/null || true # refresh the icon cache echo "✅ Nibelung $VER installed to /Applications" open "$APP"