Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / class / I18N / mklist.sh
1 #! /bin/sh
2 #
3 # mklist.sh - Make the I18N handler list file "I18N-handlers.def".
4 #
5 # Copyright (C) 2002  Southern Storm Software, Pty Ltd.
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21 # Process the command-line options.
22 ILFIND="$1"
23 OUTFILE="$2"
24 if test "x$ILFIND" = "x" ; then
25         echo "$0: missing ilfind argument" 1>&2
26         exit 1
27 fi
28 if test "x$OUTFILE" = "x" ; then
29         echo "$0: missing output file argument" 1>&2
30         exit 1
31 fi
32 shift
33 shift
34
35 # Search all region assemblies for interesting classes and
36 # write them to the specified output file.
37 exec "${ILFIND}" --public-only --sub-string I18N $* | \
38         grep 'class ' | \
39         sed -e '1,$s/^.*: class //g' - | \
40         sed -e '1,$s/^class //g' - >"${OUTFILE}"