28 lines
482 B
Bash
28 lines
482 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
# ensure we use the tools provided in root
|
||
|
export PATH="$(pwd):$PATH"
|
||
|
CWD=$(pwd)
|
||
|
|
||
|
# texture wads
|
||
|
build_wads()
|
||
|
{
|
||
|
echo "building texturesrc/*.wad"
|
||
|
|
||
|
cd "$CWD/$1/texturesrc/"
|
||
|
|
||
|
# will make a .wad out of every sub directory.
|
||
|
find ./ -type d -maxdepth 1 | while read WADDIR
|
||
|
do
|
||
|
DIRNAME=$(basename "$WADDIR")
|
||
|
|
||
|
if [ ! "$DIRNAME" = "." ]
|
||
|
then
|
||
|
echo "$DIRNAME"
|
||
|
imgtool --palette ../gfx/palette.lmp --genwad2 ../"$DIRNAME".wad ./"$DIRNAME"
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
build_wads $1
|