Created
June 17, 2016 19:06
-
-
Save rufus2021/5a4c4eb1e7423a27685bd6537f15d8dd 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 | |
DIR="lib/client/images" | |
for filename in $DIR/*; do | |
FILE=${filename##*/}; | |
FOUND=`egrep -lr --include=*.{scss,jsx,js} "($FILE)" ./lib` | |
if [ "$FOUND" ] | |
then | |
echo "" | |
else | |
echo "$FILE is not found. Removing!" | |
rm "${DIR}/${FILE}" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment