Quick SVN script for automatically adding and deleting files
Here’s a quick bash script for automatically adding and deleting files in subversion. Don’t you hate having to list each one individually? Or getting all those messages that say, “the file has already been added” when you just do svn add my/directory/*. Even more of a pain if you selectively delete a bunch of files.
I use this small little script. It’s a huge time saver.
svn status |grep '^?' |sed 's/^? /svn add "/g' |sed 's/$/"/g' |sh
svn status |grep '^!' |sed 's/^! /svn delete "/g' |sed 's/$/"/g' |sh
It’s especially handy for adding and deleting changes made to the Drupal files directory.