aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-13 12:29:21 +0000
committer_ov4 <ov4@ov4.org>2026-10-13 12:29:21 +0000
commit42acac3dac5b8ff5aec4ff204d2c1da948ea34b0 (patch)
tree1423c5f08af117f13b5bdfa6e285716f255b869b /install.sh
parent0449cae079155f61fdbb2ba3a8d3b6c79da46103 (diff)
fix: remove macOS quarantine from the installed compiler
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh10
1 files changed, 10 insertions, 0 deletions
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