macos/sterilise
- 434 bytes
- View raw
1#!/usr/bin/env bash
2# This removes the com.apple.quarantine attribute from files.
3#
4# This attribute is applied when you download a binary from the web,
5# and prevents you running it. This script is a quick alias for
6# removing that attribute if you know a file is safe.
8set -o errexit
9set -o nounset
11if (( $# == 0 ))
12then
13 echo "Usage: $0 <PATH>" >&2
14 exit 1
15fi
17for NAME in "$@"
18do
19 xattr -d com.apple.quarantine "$NAME"
20done