4 # Create sample configuration files from the tables contained with libiconv.
5 # Copyright (C) 2001 Thomas Roessler <roessler@does-not-exist.org>
7 # This ugly shell script is free software; you can distribute and/or modify
8 # it under the terms of the GNU General Public License version 2 or later.
12 test -d $LIBICONV/libcharset/tools || {
13 echo "Sorry, I can't find libiconv's source!" >&2 ;
17 for f in $LIBICONV/libcharset/tools/* ; do
19 ( head -3 $f | grep -q 'locale name.*locale charmap.*locale_charset' ) && (
20 sed '1,/^$/d' $f | awk '($4 != $3) { printf ("iconv-hook %s %s\n", $4, $3); }' | \
21 sed -e 's/^iconv-hook SJIS /iconv-hook Shift_JIS /gi' |
23 test -s tmp.rc && mv tmp.rc iconv.`basename $f`.rc