#!/bin/sh # MathPoint を Mac の PowerPoint と Word に入れる。使い方: curl -fsSL https://mcp.tex64.com/mathpoint/install | sh set -eu if [ "$(uname)" != Darwin ]; then echo "このコマンドは Mac 用です。Windows は PowerShell で: irm https://mcp.tex64.com/mathpoint/install.ps1 | iex"; exit 1 fi tmp=$(mktemp) curl -fsSL "https://mcp.tex64.com/mathpoint/addin/manifest.prod.xml" -o "$tmp" n=0 for app in Powerpoint Word; do c="$HOME/Library/Containers/com.microsoft.$app" if [ -d "$c" ]; then mkdir -p "$c/Data/Documents/wef" cp "$tmp" "$c/Data/Documents/wef/mathpoint.xml" [ "$app" = Powerpoint ] && name=PowerPoint || name=Word echo "✓ $name に MathPoint を入れました"; n=$((n + 1)) fi done rm -f "$tmp" if [ "$n" -eq 0 ]; then echo "PowerPoint か Word を一度起動してから、もう一度実行してください。"; exit 1 fi echo "PowerPoint / Word を開き直し、ホーム → アドイン → MathPoint を開いてください。"