Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/bin/bash
#hi
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for rootFolder in */ ; do
if [ -d $rootFolder"build" ]; then
echo "do you want to delete build folders of \"${rootFolder%?}\" project?"
read ans
if [ "$ans" = "y" ] || [ "$ans" = "Y" ]; then
rm -rf $rootFolder"build"
for innerFolder in $rootFolder*/ ; do
if [ -d $innerFolder"build" ]; then
rm -rf $innerFolder"build"
fi;
done
fi
fi
done
IFS=$SAVEIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment