From d33c39662760c8f6f8a3d6d735b724f8e3d0ac4d Mon Sep 17 00:00:00 2001 From: Matheus Albino Date: Sun, 11 Aug 2024 12:16:29 -0300 Subject: [PATCH] Refactor find command in images-indexer.sh --- scripts/shell/images-indexer.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/shell/images-indexer.sh b/scripts/shell/images-indexer.sh index 8e1aa8c..bb7c9a9 100755 --- a/scripts/shell/images-indexer.sh +++ b/scripts/shell/images-indexer.sh @@ -82,7 +82,14 @@ fi cd $furry_commission_ideas_path -existing_folders=($(find * -type d -not -path artists -not -path kinks -not -path ideas)) +ignore_paths=("artists" "kinks" "ideas" "irl") +find_command="find * -type d" + +for path in "${ignore_paths[@]}"; do + find_command+=" -not -path $path" +done + +existing_folders=($(eval $find_command)) filtered_existing_folders=()