Created
June 24, 2009 22:13
-
-
Save jbgutierrez/135551 to your computer and use it in GitHub Desktop.
Borra directorios vacíos de un repositorio de subversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# init | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
# look for empty dir | |
for SUBDIR in `find . -type d | grep -v .svn`; do | |
if [ ! "$(ls $SUBDIR)" ]; then | |
rm -rf $SUBDIR | |
echo "$SUBDIR is Empty" | |
fi | |
done | |
# restore $IFS | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment