From 3d918efbe09e8735018ee225f19e30f734ea908d Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Sun, 29 Jul 2012 22:04:41 +0200 Subject: .functions: Add `unquarantine` which force-removes a downloaded app or file from the quarantine Thanks to @jasomill on Hacker News: http://news.ycombinator.com/item?id=4307379. --- .functions | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.functions') diff --git a/.functions b/.functions index 8aa20c8..a544dfd 100644 --- a/.functions +++ b/.functions @@ -76,4 +76,11 @@ function unidecode() { function codepoint() { perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))" echo # newline +} + +# Manually remove a downloaded app or file from the quarantine +function unquarantine() { + for attribute in com.apple.metadata:kMDItemDownloadedDate com.apple.metadata:kMDItemWhereFroms com.apple.quarantine; do + xattr -r -d "$attribute" "$@" + done } \ No newline at end of file -- cgit v1.2.3