diff --git a/scripts/purge_images.sh b/scripts/purge_images.sh index 55547b6..57a0bf9 100755 --- a/scripts/purge_images.sh +++ b/scripts/purge_images.sh @@ -1,7 +1,7 @@ #!/bin/bash # If there are images in img/ that are not being used by the Zettelkasten, delete them -find /home/thomas/repos/eolas/_img -type f | while read filename; do +find /home/thomas/repos/eolas/img -type f | while read filename; do rg "${filename##*/}" ../ --type markdown >/dev/null 2>&1 if [ "$?" -eq 1 ]; then echo "Deleted unused image: ${filename##*/}"