Created
November 24, 2015 17:08
-
-
Save joelcardinal/5a22db0b3e8079fd4dda to your computer and use it in GitHub Desktop.
Quick bash script to discover static files not used in Demandware codebase
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
#!/bin/bash | |
# Quick script to discover static files not used in codebase | |
# to create fileList.txt | |
# ls -1R ./workspace2/app_core/cartridge/static > imgList.txt | |
# then dedupe... | |
# This script needs to go in parent dir of "workspace" dir | |
while read p; do | |
if grep -rlq --exclude-dir=*\.{svn,plugins,metadata,git} "$p" ./workspace;then | |
echo $p | |
else | |
echo $p >> filesNotFound.txt | |
fi | |
done <fileList.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment