Created
January 17, 2018 17:21
-
-
Save abbas-oveissi/2d85b8178c11952ae8960392d834b03a to your computer and use it in GitHub Desktop.
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 | |
#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