I added about 35 images to my project this morning. I was for a moment, wondering how I could avoid adding each image, one by one to the repository. I did not, for the life of me, want to do:
svn add imageFileName
35 times over.
I wasn't using Eclipse which would have probably done this for me in a breeze. (When is there going to be a Cocoa or a Cocoa Touch plugin for Eclipse, btw???)
Google, as you know is my friend. I googled and found stuff. But beware - the first hit in Google does not give you a method that works. The second does, which I reproduce here for you: Open a terminal and navigate to your folder and type:
for i in $(svn st | grep "?" | awk '{print $2}'); do svn add $i; done;
and katakatakatakat.... all your files will be added to your repository in a jiffy!
What's the big deal about this? Not too big. Anybody with a rudimentary knowledge of shell scripting or the Unix command line could have figured this out. Well, true! But how many people do?
You might ask, if you feel all programmers should know shell scripting, why did I need to Google this? Why could I not do it myself. Good question. Next question.
3 comments:
Cool, nice one Kamal! Thanks for sharing :)
Good question. Next question.
That line is classic!!!!
I can't imagine coding with out eclipse. This one might help me in future. thanks for sharing
Post a Comment