mktar: Use `wc` instead of `du` in summary message
[sunny256-utils.git] / nosvn
blobc8320005a0c2909a038f290c74ca07b1d5b3716e
1 #!/bin/sh
3 #=======================================================================
4 # nosvn
5 # File ID: b45d981c-5d41-11df-ac4e-90e6ba3022ac
6 # Reads a bunch of filenames from stdin or files specified on the
7 # command line and strips .svn directories away. Examples:
8 #
9 # Really clean up the working copy:
10 # cd /top/of/working/copy
11 # find . -type f | nosvn | xargs rm
12 # svn revert -R .
13 # Show the size of the working copy without the .svn directories:
14 # cd /working/copy
15 # find . -type f | nosvn | xargs wc -c
17 # Specifying -r (for reverse) as the first parameter lists only .svn
18 # directories and their contents.
19 #=======================================================================
21 if [ "$1" = "-r" ]; then
22 shift
23 cat $* | egrep '/\.svn(/|$)'
24 else
25 cat $* | egrep -v '/\.svn(/|$)'