Skip to content

Commit

Permalink
.functions: Add unquarantine which force-removes a downloaded app o…
Browse files Browse the repository at this point in the history
…r file from the quarantine

Thanks to @jasomill on Hacker News: http://news.ycombinator.com/item?id=4307379.
  • Loading branch information
mathiasbynens committed Jul 29, 2012
1 parent b308bc6 commit 3d918ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .functions
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 3d918ef

Please sign in to comment.