Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546#!/bin/bashset -euo pipefail
if [[ $# != 1 ]]; then printf 'Usage: %s bundle-path\n' "$0" >&2 exit 2fiapp=$1binary="$app/Contents/MacOS/Parcel"if [[ ! -d $app || ! -f $binary || ! -x $binary ]]; then printf 'Missing or invalid Parcel bundle binary: %s\n' "$binary" >&2 exit 1fiwork=$(mktemp -d "${TMPDIR:-/tmp}/parcel-reality-isolation.XXXXXX")trap 'rm -rf "$work"' EXITfind "$app" -name 'ParcelRealityDriver*' -print > "$work/helpers"if [[ -s $work/helpers ]]; then printf 'Reality helper found in ordinary bundle: %s\n' "$app" >&2 while IFS= read -r helper; do printf '%s\n' "$helper" >&2; done < "$work/helpers" exit 1fi
# Finish each inspection before matching so an early grep exit cannot hide a tool failure.for tool in strings nm; do status=0 "$tool" "$binary" > "$work/$tool" || status=$? if (( status )); then printf 'Could not inspect %s with %s (status %s).\n' "$binary" "$tool" "$status" >&2 exit "$status" fidoneif grep -F -e PARCEL_REALITY_DRIVER_SOCKET -e AppRealityDriverHost "$work/strings" >&2; then printf 'Reality spawn strings found in ordinary bundle: %s\n' "$binary" >&2 exit 1else status=$? if (( status != 1 )); then exit "$status"; fifiif grep -F AppRealityDriverHost "$work/nm" >&2; then printf 'Reality spawn symbol found in ordinary bundle: %s\n' "$binary" >&2 exit 1else status=$? if (( status != 1 )); then exit "$status"; fifi