Permalink
Browse files

added clear-quarantine.sh, see also http://www.entropy.ch/blog/Develo…

  • Loading branch information...
1 parent e29f7ea commit 462d5513eb6f0ff1173de2a66783797dde18b1f8 @liyanage committed Jun 12, 2009
Showing with 32 additions and 0 deletions.
  1. +6 −0 add-leading-zero.sh
  2. +26 −0 clear-quarantine.sh
View
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# add leading zeros to single-digit photo files.
+
+for i in ?\ D*; do mv "$i" "0$i"; done
+
View
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# Remove the quarantine extended attribute from all
+# developer documentation HTML files to get rid
+# of the "downloaded from the Internet" warning
+#
+# Marc Liyanage / www.entropy.ch
+#
+
+[ $UID -eq 0 ] || { echo $0 must be run as root; exit 1; }
+
+find /Developer -type f -name '*.html' | python <(cat - <<EOF
+#!/usr/bin/env python
+
+from xattr import *
+import sys
+import string
+
+attr = 'com.apple.quarantine'
+
+for file in sys.stdin:
+ file = string.rstrip(file, "\n")
+ if (attr in listxattr(file)):
+ removexattr(file, attr)
+EOF
+)

0 comments on commit 462d551

Please sign in to comment.