diff options
author | Mathias Bynens <mathias@qiwi.be> | 2012-07-29 22:04:41 +0200 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2012-07-29 22:04:41 +0200 |
commit | 3d918efbe09e8735018ee225f19e30f734ea908d (patch) | |
tree | cd1bc4f0d5c825856748407af0c717fe0252aee6 /.functions | |
parent | b308bc6935d24da72446569500ca634f0fbfd2c4 (diff) | |
download | dotfiles-3d918efbe09e8735018ee225f19e30f734ea908d.tar.gz dotfiles-3d918efbe09e8735018ee225f19e30f734ea908d.tar.bz2 dotfiles-3d918efbe09e8735018ee225f19e30f734ea908d.zip |
.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.
Diffstat (limited to '.functions')
-rw-r--r-- | .functions | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |