mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix MPQ detection failing when files are lowercase .mpq
The sanity check `ls *.MPQ *.mpq` fails under `set -o pipefail` when only one case variant exists, because ls exits non-zero for the unmatched glob pattern and pipefail propagates that failure. Use `compgen -G` to check each glob pattern independently instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
21f7b0f199
commit
ca852345a1
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ if [ -d "${OUTPUT_DIR}/expansions" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Quick sanity check: look for any .MPQ files
|
# Quick sanity check: look for any .MPQ files
|
||||||
if ! ls "$MPQ_DIR"/*.MPQ "$MPQ_DIR"/*.mpq 2>/dev/null | head -1 > /dev/null 2>&1; then
|
if ! compgen -G "$MPQ_DIR"/*.MPQ > /dev/null 2>&1 && ! compgen -G "$MPQ_DIR"/*.mpq > /dev/null 2>&1; then
|
||||||
echo "Error: No .MPQ files found in: $MPQ_DIR"
|
echo "Error: No .MPQ files found in: $MPQ_DIR"
|
||||||
echo "Make sure this is the WoW Data/ directory (not the WoW root)."
|
echo "Make sure this is the WoW Data/ directory (not the WoW root)."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue