Update .gitea/workflows/ci.yml

This commit is contained in:
Arlind
2025-06-08 23:24:40 +02:00
parent 3e84674bb9
commit 08b638fd38

View File

@@ -179,11 +179,12 @@ jobs:
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
echo "[Duplicate Skin Name Check Started]" echo "[Duplicate Skin Name Check Started]"
# Ensure DANSER_SKINS_DIR is set and valid # Guard: ensure DANSER_SKINS_DIR is set and exists
if [ -z "${DANSER_SKINS_DIR:-}" ] || [ ! -d "${DANSER_SKINS_DIR}" ]; then if [ -z "${DANSER_SKINS_DIR:-}" ] || [ ! -d "${DANSER_SKINS_DIR}" ]; then
echo "DANSER_SKINS_DIR is not set or is not a directory. Exiting." echo "DANSER_SKINS_DIR is not set or not a directory. Exiting."
exit 1 exit 1
fi fi
@@ -206,7 +207,7 @@ jobs:
ini=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1 || true) ini=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1 || true)
if [ -f "$ini" ]; then if [ -f "$ini" ]; then
line=$(grep -i '^[[:space:]]*Name:' "$ini" | head -n1) line=$(grep -i '^[[:space:]]*Name:' "$ini" | head -n1 || true)
if [ -n "${line:-}" ]; then if [ -n "${line:-}" ]; then
val="${line#*:}" val="${line#*:}"
val=$(echo "$val" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') val=$(echo "$val" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
@@ -218,9 +219,9 @@ jobs:
done done
shopt -u nullglob shopt -u nullglob
for name in "${!name_counts[@]}"; do for nm in "${!name_counts[@]}"; do
if [ "${name_counts[$name]}" -gt 1 ]; then if [ "${name_counts[$nm]}" -gt 1 ]; then
duplicates+=("$name (${name_counts[$name]} skins)") duplicates+=("$nm (${name_counts[$nm]} skins)")
fi fi
done done