Browse files

.functions: Add `unquarantine` which force-removes a downloaded app o…

…r file from the quarantine

Thanks to @jasomill on Hacker News: http://news.ycombinator.com/item?id=4307379.
  • Loading branch information...
1 parent b308bc6 commit 3d918efbe09e8735018ee225f19e30f734ea908d @mathiasbynens committed Jul 29, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 .functions
View
7 .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
}

0 comments on commit 3d918ef

Please sign in to comment.