build_wads.sh: fix typo

This commit is contained in:
Marco Cawthorne 2025-01-29 22:58:45 -08:00
parent 5708e6ea7a
commit a1c4cf7394

View file

@ -4,6 +4,8 @@
export PATH="$(pwd):$PATH"
CWD=$(pwd)
PALETTE="palette_nofb.lmp"
# texture wads
build_wads()
{
@ -16,6 +18,11 @@ build_wads()
do
DIRNAME=$(basename "$WADDIR")
if [ "$DIRNAME" = "gfx" ]
then
PALETTE="palette.lmp"
fi
if [ ! "$DIRNAME" = "." ]
then
if [ -f "$WADDIR/WAD3" ]
@ -23,14 +30,14 @@ build_wads()
printf "WAD3 building %s:\n" "$DIRNAME"
imgtool --genwad3 ../"$DIRNAME".wad ./"$DIRNAME"
else
if [ -f "../gfx/palette_nofb.lmp" ]
if [ -f "../gfx/$PALETTE" ]
then
printf "WAD2 Building %s:\n" "$DIRNAME"
if [ -f "$CWD/$1/texturesrc/$DIRNAME/palette.lmp" ]
then
imgtool --palette "$CWD/$1/texturesrc/$DIRNAME/palette.lmp" --genwad2 ../"$DIRNAME".wad ./"$DIRNAME"
else
imgtool --palette ../gfx/palette_nofb.lmp --genwad2 ../"$DIRNAME".wad ./"$DIRNAME"
imgtool --palette ../gfx/$PALETTE --genwad2 ../"$DIRNAME".wad ./"$DIRNAME"
fi
else
printf "WAD2 (using Quake palette) building %s:\n" "$DIRNAME"