Created
July 12, 2021 07:44
-
-
Save bsaqqa/7067b46803e3f360e32a7a0fa26d1403 to your computer and use it in GitHub Desktop.
Remove `vendor` and `node_modules` folders from all folders of current directory
This file contains hidden or 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
# Color | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
YELLOW='\033[0;33m' | |
NC='\033[0m' # No Color | |
function red { | |
printf "${RED}$@${NC}\n" | |
} | |
function green { | |
printf "${GREEN}$@${NC}\n" | |
} | |
function yellow { | |
printf "${YELLOW}$@${NC}\n" | |
} | |
for d in $(find . -name vendor -maxdepth 2 -type d) | |
do | |
echo $(yellow " >> Removeing: ") $d | |
rm -rf $d | |
echo $(green " >> Removed: " ) $(green $d) | |
done # >output_file | |
for d in $(find . -name node_modules -maxdepth 2 -type d) | |
do | |
echo $(yellow " >> Removeing: ") $d | |
rm -rf $d | |
echo $(green " >> Removed: " ) $(green $d) | |
done # >output_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment