From 42acac3dac5b8ff5aec4ff204d2c1da948ea34b0 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 13 Oct 2026 12:29:21 +0000 Subject: fix: remove macOS quarantine from the installed compiler Co-Authored-By: Claude Fable 5.1 --- install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'install.sh') diff --git a/install.sh b/install.sh index eded452..43a4a42 100755 --- a/install.sh +++ b/install.sh @@ -56,6 +56,16 @@ install -m 755 "$source_dir/cpsc" "$bin_dir/cpsc" \ install -m 644 "$source_dir/doc/cpsc.1" "$man_dir/cpsc.1" \ || die "cannot install the manual to $man_dir; check permissions" +if [ "$(uname -s)" = Darwin ]; then + command -v xattr >/dev/null 2>&1 || die "required command not found: xattr" + attributes=$(xattr "$bin_dir/cpsc") \ + || die "cannot read extended attributes of $bin_dir/cpsc" + if printf '%s\n' "$attributes" | grep -qx 'com\.apple\.quarantine'; then + xattr -d com.apple.quarantine "$bin_dir/cpsc" \ + || die "cannot remove quarantine from $bin_dir/cpsc; check permissions" + fi +fi + printf 'Installed %s\nInstalled %s\n' "$bin_dir/cpsc" "$man_dir/cpsc.1" if [ -z "$destdir" ]; then case ":${PATH:-}:" in -- cgit v1.3.1-4-g156e