Fix helpers loader: helpers are available in v1 or v2

This commit is contained in:
Alexandre Aubin 2024-06-03 17:42:17 +02:00 committed by GitHub
parent b67d4621fc
commit c4c0210dc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ set +x
YNH_HELPERS_DIR="$SCRIPT_DIR/helpers.v${YNH_HELPERS_VERSION}.d" YNH_HELPERS_DIR="$SCRIPT_DIR/helpers.v${YNH_HELPERS_VERSION}.d"
case "$YNH_HELPERS_VERSION" in case "$YNH_HELPERS_VERSION" in
1) "1" | "2")
readarray -t HELPERS < <(find "$YNH_HELPERS_DIR" -mindepth 1 -maxdepth 1 -type f) readarray -t HELPERS < <(find "$YNH_HELPERS_DIR" -mindepth 1 -maxdepth 1 -type f)
for helper in "${HELPERS[@]}"; do for helper in "${HELPERS[@]}"; do
[ -r "$helper" ] && source "$helper" [ -r "$helper" ] && source "$helper"