#!/bin/sh set -eu if [ "$#" -eq 1 ] && { [ "$1" = "--help" ] || [ "$1" = "-h" ]; }; then echo "Usage: $0 " exit 0 fi # Replacing native assets under a live Flutter process can load a second SQLite # image on a later lazy FFI lookup, mixing its globals with existing handles. # Check the exact build product, not other installed copies of the application. if [ "$#" -ne 1 ]; then echo 'usage: check_macos_build_target.sh ' >&2 exit 2 fi if /bin/ps -axo comm= | /usr/bin/grep -Fx -- "$1" >/dev/null; then echo 'error: Cutdex is running from this build target. Save your edits and quit it (or stop the debugger), then rebuild. Hot reload does not require a native rebuild.' >&2 exit 1 fi