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


Click here to return to the 'A script to handle bundles within Subversion' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to handle bundles within Subversion
Authored by: jerry_quart on Sep 20, '07 08:30:25AM

Nice script, thanks for posting! I would change only a few things ;-)

1. The script was running on my Mac only by extending the first line:
#!/usr/bin/ruby -w

2. If a path or bundle-name contains spaces the 'system' call will brake. Better to quote it:
system "tar --create --file='#{archive}' --bzip2 --directory='#{dir}' '#{bundle}'"

3. In my opinion using this script only makes sense if you remove the original bundle from the folder:
system "[ -d '#{dir}/#{bundle}' ] && rm -Rf '#{dir}/#{bundle}' || echo 'Failed to remove bundle!'"

4. For developers it would make sense to extend the extensions:
$extensions = %w{pages key oo3 graffle xcodeproj pbproj nib app}

jerry



[ Reply to This | # ]