diff options
-rw-r--r-- | trunk/lib/common.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 35b2de7..14b4646 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -681,7 +681,7 @@ function svn_remove_empty_folders { main_folder="$1" search="`find $main_folder -type d | grep -v '/.svn' | sed '1d'`" - results="`echo "$search" | wc -l`" + results="`echo "$search" | wc -w`" # folders can't have space, slackware compliance if [ "$results" -eq "0" ]; then if [ "`find $main_folder -not -type d | wc -l`" -eq "0" ]; then @@ -693,6 +693,10 @@ function svn_remove_empty_folders { done fi + if [ "`find $main_folder -not -type d | wc -l`" -eq "0" ]; then + svn_del $folder + fi + } # ----------------------------------------------- |