diff --git a/_scripts/clean_image_directory.sh b/_scripts/clean_image_directory.sh old mode 100644 new mode 100755 index 1b120bd..3e897a6 --- a/_scripts/clean_image_directory.sh +++ b/_scripts/clean_image_directory.sh @@ -1,5 +1,6 @@ #!/bin/bash +# If there are images in _img/ that are not being used in the workspace, delete them find /home/thomas/repos/computer_science/img -type f | while read filename; do rg "${filename##*/}" ../ --type markdown >/dev/null 2>&1 if [ "$?" -eq 1 ]; then @@ -7,5 +8,3 @@ find /home/thomas/repos/computer_science/img -type f | while read filename; do rm $filename fi done - -