From 4330996273ec7bf55816cb4b9ed91b7015a85d38 Mon Sep 17 00:00:00 2001 From: Matheus Albino Date: Wed, 14 Aug 2024 12:53:54 -0300 Subject: [PATCH] Updates images-indexer.sh script --- scripts/shell/images-indexer.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/shell/images-indexer.sh b/scripts/shell/images-indexer.sh index 22b3926..b30518c 100755 --- a/scripts/shell/images-indexer.sh +++ b/scripts/shell/images-indexer.sh @@ -83,24 +83,19 @@ fi cd $furry_commission_ideas_path ignore_paths=("artists" "kinks" "ideas" "irl") +ignore_paths_depth_2=("artists" "favorites") + 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=() - -# removing artists folder depth 2 only -for folder in "${existing_folders[@]}"; do - if [[ ! $folder =~ ^artists/[^/]+$ ]]; then - filtered_existing_folders+=("$folder") - fi +for path in "${ignore_paths_depth_2[@]}"; do + find_command+=" -not -path $path/\*" done -existing_folders=("${filtered_existing_folders[@]}") +existing_folders=($(eval $find_command)) input_create_folder() { read -p "[INFO] Please create one: " new_foldername