fix-macos-gatekeeper.sh 400 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. APP="${1:-dist/mac-universal/LuatOS Flasher.app}"
  4. if [ ! -d "$APP" ]; then
  5. echo "找不到 App:$APP"
  6. echo "用法:$0 \"/path/to/LuatOS Flasher.app\""
  7. exit 1
  8. fi
  9. echo "清理 quarantine:$APP"
  10. xattr -cr "$APP" || true
  11. echo "ad-hoc 签名(本地运行用)"
  12. codesign --force --deep --sign - "$APP"
  13. echo "完成。现在可以双击打开:$APP"