File size: 712 Bytes
b2c9ced | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/bin/bash
# After `electron-builder --mac`: rebuild the Mac .zip so it holds Arx.app AND "How to open Arx.txt"
# (a .zip has no installer window to show the first-open steps). Keeps the app's signature and attributes (ditto).
set -euo pipefail
cd "$(dirname "$0")/.."
VERSION=$(node -p "require('./package.json').version")
ZIP="dist/Arx-$VERSION-mac-universal.zip"
APP="dist/mac-universal/Arx.app"
[ -d "$APP" ] || { echo "missing $APP" >&2; exit 1; }
TMP=$(mktemp -d)
ditto "$APP" "$TMP/Arx/Arx.app"
cp "build/How-to-open-Arx.txt" "$TMP/Arx/How to open Arx.txt"
rm -f "$ZIP" "$ZIP.blockmap"
ditto -c -k --sequesterRsrc --keepParent "$TMP/Arx" "$ZIP"
rm -rf "$TMP"
echo "rebuilt $ZIP with How to open Arx.txt"
|