1#!/bin/bash
2
3# This file is part of OpenTTD.
4# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
5# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
6# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
7
8# Set neutral locale so sort behaves the same everywhere
9LC_ALL=C
10export LC_ALL
11
12# We really need gawk for this!
13AWK=gawk
14
15${AWK} --version > /dev/null 2> /dev/null
16if [ "$?" != "0" ]; then
17	echo "This script needs gawk to run properly"
18	exit 1
19fi
20
21case $2 in
22	*ai_changelog.hpp) cat $2; exit 0;;
23	*game_changelog.hpp) cat $2; exit 0;;
24esac
25
26${AWK} -v api=$1 -f doxygen_filter.awk $2
27