Page MenuHomePhabricator
Paste P9491

check.sh
ActivePublic

Authored by brennen on Mon, Oct 28, 8:39 PM.
Tags
None
Subscribers
None
Tokens
"The World Burns" token, awarded by zeljkofilipin.
14:38:31 brennen@inertia:~/code/filipin (master m0/u1) ✶ cat check.sh
#!/bin/sh
find assets | while read -r image; do
image_basename=$(basename "$image")
if grep -q "$image_basename" -ri _posts; then
echo "Used: $image"
else
echo "Unused: $image"
fi
done
14:38:48 brennen@inertia:~/code/filipin (master m0/u1) ✶ sh ./check.sh | grep Used | wc -l
196
14:38:54 brennen@inertia:~/code/filipin (master m0/u1) ✶ sh ./check.sh | grep Unused | wc -l
36

Event Timeline

brennen created this paste.Mon, Oct 28, 8:39 PM