2021-10-06 02:20:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# run from project root directory
|
|
|
|
|
2021-10-06 04:40:16 +00:00
|
|
|
games=$(grep "," res/GAMES.CONF | grep -v "^#" | cut -d"," -f2 | cut -d"=" -f1 | sort)
|
|
|
|
cp res/GAMEHELP/STANDARD "$1"
|
2021-10-06 02:20:15 +00:00
|
|
|
for c in {A..Z}; do
|
2021-10-06 04:40:16 +00:00
|
|
|
echo "group$c"
|
2021-10-06 04:54:17 +00:00
|
|
|
for game in $(echo "$games" | grep "^$c"); do
|
2021-10-06 02:20:15 +00:00
|
|
|
echo "!byte ${#game}"
|
|
|
|
echo "!text \"$game\""
|
|
|
|
if [ -f "res/GAMEHELP/$game" ]; then
|
2021-10-06 04:40:16 +00:00
|
|
|
echo "!be24 $(wc -c <"$1")"
|
2021-10-06 02:20:15 +00:00
|
|
|
cat res/GAMEHELP/"$game" >> "$1"
|
|
|
|
else
|
|
|
|
echo "!be24 0"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done > "$2"
|