#!/bin/bash # One-line install of TSC Reader for macOS (no admin rights, no "unidentified developer" prompt): # curl -fsSL https://tsc-copier.pages.dev/downloads/install-mac.sh | bash # Downloads the DMG for this Mac (Apple Silicon or Intel), copies the app to ~/Applications and starts it. set -e DL="${TSC_DL_URL:-https://tsc-copier.pages.dev/downloads}" ARCH=$(uname -m); [ "$ARCH" = "arm64" ] || ARCH=x86_64 TMP=$(mktemp -d) echo "Downloading TSC Reader for $ARCH ..." curl -fL "$DL/TSC-Reader-macos-$ARCH.dmg" -o "$TMP/reader.dmg" MNT=$(hdiutil attach -nobrowse -readonly "$TMP/reader.dmg" | awk -F'\t' '/\/Volumes\//{print $NF}' | tail -1) mkdir -p "$HOME/Applications" rm -rf "$HOME/Applications/TSC Reader.app" cp -R "$MNT/TSC Reader.app" "$HOME/Applications/" hdiutil detach -quiet "$MNT" || true rm -f "$TMP/reader.dmg"; rmdir "$TMP" 2>/dev/null || true xattr -dr com.apple.quarantine "$HOME/Applications/TSC Reader.app" 2>/dev/null || true open "$HOME/Applications/TSC Reader.app" echo "Installed in ~/Applications. TSC Reader runs in the menu bar; your browser opens its page."