1
0
mirror of https://github.com/Prowlarr/Indexers.git synced 2025-12-19 18:48:24 +00:00

Fixed: script fixed adding new indexers

This commit is contained in:
ServarrAdmin
2025-08-16 09:32:07 -05:00
parent 20ad1b245f
commit 9b17e35c0e

View File

@@ -629,16 +629,16 @@ handle_yml_conflicts() {
log "DEBUG" "YML Definitions Process: [$yml_defs]"
for def in $yml_add; do
log "DEBUG" "Using & Adding Jackett's definition yml; [$def]"
# Check if the file actually exists before proceeding
if [ ! -f "$def" ] && ! git ls-files --error-unmatch "$def" >/dev/null 2>&1; then
log "DEBUG" "File [$def] does not exist, skipping"
# Check if the file exists in working directory OR in git index before proceeding
if [ ! -f "$def" ] && ! git ls-files --cached "$def" 2>/dev/null | grep -q "^$def$"; then
log "DEBUG" "File [$def] does not exist in working directory or git index, skipping"
continue
fi
# 1) Create a new path by replacing "src/Jackett.Common/Definitions/"
# with "definitions/$MIN_SCHEMA/".
# - In Bash parameter expansion, the syntax is:
# ${variable/search/replace}
new_def="${def/src\/Jackett\.Common\/Definitions\//definitions/v$MIN_SCHEMA/}"
new_def="${def/src\/Jackett.Common\/Definitions\//definitions/v$MIN_SCHEMA/}"
# 2) If the path has changed, we do a rename; otherwise, just do normal checkout
if [ "$new_def" != "$def" ]; then
# Make sure the target directory exists