Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.4: An Automator plug-in to tar and gzip in the Finder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: An Automator plug-in to tar and gzip in the Finder
Authored by: on Aug 05, '05 04:32:34PM
Thanks for your help with this. I made one to make zip archives that exclude .DS_Store files too. Here's the code:

for f in "$@"
	path=`dirname "$f"`
	file=`basename "$f"`
	cd "$path"
	zip -r "$" "$file" -x \*.DS_Store
I just replaced the line
tar --exclude=".DS_Store" -czf "$file.tgz" "$file"
with this one:
zip -r "$" "$file" -x \*.DS_Store
This actually excludes any file ending with .DS_Store. I couldn't figure out the syntax to specify just one file. Reading man pages is still new to me. But how often do you have a file called my_important_document.DS_Store ? Right, me neither, so this script works fine then :-)

[ Reply to This | # ]