Updated iwad selector to follow simlinks so that it will work with the way lgm handles installed Blasphemer package.

This commit is contained in:
Storm Dragon 2024-08-12 20:57:32 -04:00
parent af9787d030
commit ea8136801f

View File

@ -55,7 +55,7 @@ for i in "${wadPaths[@]}"; do
if [[ -d "$i" ]]; then if [[ -d "$i" ]]; then
while IFS= read -r -d $'\0' wad; do while IFS= read -r -d $'\0' wad; do
is_iwad "$wad" && wadList+=("$wad") is_iwad "$wad" && wadList+=("$wad")
done < <(find "$i" -maxdepth 1 -type f -iname '*.wad' -print0) done < <(find "$i" -follow -maxdepth 1 -type f -iname '*.wad' -print0)
fi fi
done done
@ -79,7 +79,7 @@ iwad=$(yad --list \
--skip-taskbar \ --skip-taskbar \
"${wadMenu[@]}") "${wadMenu[@]}")
yadCode="$?" yadCode="$?"
[[ ${yadCode} -eq 1 ]] && exit 0 [[ ${yadCode} -eq 0 ]] || exit 0
iwad="${iwad#*|}" iwad="${iwad#*|}"
iwad="${iwad%|}" iwad="${iwad%|}"
gzdoom "$@" -iwad "${iwad}" gzdoom "$@" -iwad "${iwad}"