1
0
angie-conv-image/image-entry.d/11-core-modules.envsh

37 lines
743 B
Plaintext
Raw Normal View History

2024-07-15 16:15:47 +03:00
#!/bin/sh
unset core_modules core_snippets
core_modules=
core_snippets="${NGX_CORE_SNIPPETS:-}"
## filter out builtin core modules
unset i
for i in ${NGX_CORE_MODULES:-} ; do
[ -n "$i" ] || continue
if is_builtin_module core "$i" ; then
log "$i is builtin module, moving to snippets"
2024-07-20 16:35:39 +03:00
core_snippets="${core_snippets} $i"
2024-07-15 16:15:47 +03:00
continue
fi
## naive deduplication
case " ${core_modules} " in
*" $i "* )
log "$i is already specified"
continue
;;
esac
core_modules="${core_modules}${core_modules:+ }$i"
done
unset i
set -a
NGX_CORE_MODULES="${core_modules}"
2024-07-20 16:35:39 +03:00
NGX_CORE_SNIPPETS=$(sort_dedup_list "${core_snippets}")
NGX_CORE_EVENTS_SNIPPETS=$(sort_dedup_list "${NGX_CORE_EVENTS_SNIPPETS}")
2024-07-15 16:15:47 +03:00
set +a
unset core_modules core_snippets