Created
July 3, 2021 08:11
-
-
Save rezaiyan/5025d0dc09f5058a192bb7b535036755 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