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.

#!/bin/bash
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 *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>