Slick shell Script for automatically svn adding and deleting files

I’m working on a job that recently required adding a large number of new animated banners to the filestructure as part of an update.  Scoured the web for a good trick and BANG, found it.  This script comes from Kathleen Murtagh’s blog with a slight edit from one of her readers, perusio.

svn status | grep '^?' | sed -e 's/^? /svn add "/g' -e 's/$/"/g' | sh
svn status | grep '^!' | sed -e 's/^! /svn delete "/g' -e 's/$/"/g' | sh

Truly a timesaver.

Leave a Reply

Your email address will not be published. Required fields are marked *