Skip to content

Instantly share code, notes, and snippets.

@tzi
Created August 14, 2012 13:26
Show Gist options
  • Save tzi/3349226 to your computer and use it in GitHub Desktop.
Save tzi/3349226 to your computer and use it in GitHub Desktop.
#Shell aliases: show and clean .svn folders
show_svn() {
if [ -d "$1.svn" ]
then
echo "$1.svn"
fi
for file in `ls -p $1 2>/dev/null | grep "/$"`
do·
show_svn "$1$file"
done
}
alias showsvn=show_svn
clean_svn() {
for svn in `show_svn $1`
do
rm -rf $svn
done
}
alias cleansvn=clean_svn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment