From 9c5fe6a3e0de31596e2bf91b053e1819f53dd4de Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Tue, 27 Dec 2022 19:03:42 +0000 Subject: [PATCH] Create img purge script and apply --- _scripts/clean_image_directory.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 _scripts/clean_image_directory.sh 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 - -