Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Bjørn Arild Mæland http://www.chrononaut.net/

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

Easy way to zip dirs in zsh

This is just a quick way to zip dirs from zsh, while ignoring unwanted files like .DS_Store and .svn/*.

zipdir() { zip "$@".zip -r "$@" -x "*/.DS_Store" "*/.svn/*" }

Add all new files to Subversion

This solution is shell-agnostic, unlike http://textsnippets.com/posts/show/450, and cleaner than to do a --force. I recommend adding it to a alias in your shell, i.e "sall".

svn st | grep "^?" | awk -F "      " '{print $2}' | xargs svn add


Can be modified to do a svn delete on files you accidentally rm -rf'ed:

svn st | grep "^!" | awk -F "      " '{print $2}' | xargs svn delete
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed