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