Introduce TinyHttp server
[lcapit-junk-code.git] / svn-cleanup
blob432e144b557a386d235fcded70a485c44b09860d
1 #!/bin/sh
3 # Reset a SVN working copy to its original state
5 # Luiz Fernando N. Capitulino
6 # <lcapitulino@gmail.com>
8 NO_SVN=$1
10 usage()
12 echo "usage: $(basename $0) [ -n ]"
15 if [ $# -gt 1 ]; then
16 usage
17 exit 1
20 if [ "$1" = "-h" -o "$1" = "--help" ]; then
21 usage
22 exit 0
25 svn revert -R . 1> /dev/null || exit 1
27 # we can't remove in the background because we may download
28 # the same file with 'svn up'
29 svn st | egrep '^\?' | xargs rm -rf
30 find . -iname '*~' | xargs rm -f
32 if [ -z "$NO_SVN" ]; then
33 svn up 1> /dev/null || exit 1