Skip to content

Instantly share code, notes, and snippets.

@swillits
Last active February 12, 2024 23:32
Show Gist options
  • Save swillits/9553724 to your computer and use it in GitHub Desktop.
Save swillits/9553724 to your computer and use it in GitHub Desktop.
(Gatekeeper) Unquarantine files. http://www.sethwillits.com/temp/Unquarantine.workflow.zip Automator service. Stick in ~/Library/Services. Right-click file(s) in Finder, Services -> Unquarantine. Bingo!
function unquarantine()
{
for file in $@
do
xattr -d com.apple.quarantine $file
if [ -d "${file}" ] ; then
while IFS= read -r -d '' subfile; do
if [ "$file" != "$subfile" ]; then
unquarantine $subfile;
fi
done < <(find $file \! -name ".*" -print0)
fi
done
}
unquarantine $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment