#!/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python # xattr.copy - Created by Brian Murray # EASY-INSTALL-ENTRY-SCRIPT: 'xattr==0.5','console_scripts','xattr' __requires__ = 'xattr==0.5' import sys import os import xattr from pkg_resources import load_entry_point filename = sys.argv[1] tofile = sys.argv[2] #attr_name = sys.argv[2] #attr_value = sys.stdin.read() #sys.stdout.write("FileName: %s\n" % filename) #sys.stdout.write("AttrName: %s\n" % attr_name) #sys.stdout.write("AttrValu: %s\n" % attr_value) attrs = xattr.xattr(filename) toattrs = xattr.xattr(tofile) for at in attrs: #sys.stderr.write("Attribute %s\n" % at) toattrs[at] = attrs[at] #attrs[attr_name] = attr_value sys.exit(0)