Skip to content

Instantly share code, notes, and snippets.

@jbgutierrez
Created June 24, 2009 22:13
Show Gist options
  • Save jbgutierrez/135551 to your computer and use it in GitHub Desktop.
Save jbgutierrez/135551 to your computer and use it in GitHub Desktop.
Borra directorios vacíos de un repositorio de subversion
#!/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