wxWidgets/misc/unictabl/mk_fallbacks.sh
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

74 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
add_fallback()
{
echo " - for $3..."
cat _tmp3 | grep "$1" | while read i ; do
code=`echo $i | cut -c1-6`
echo "$code $2" >> _tmp5
done
}
echo " * getting list of needed unicode characters..."
cat mappings/*.TXT | sed -n '/^0x../p' | \
cut -f2,4 | sort | uniq | sed -n '/^0x/p' > _tmp1
cat _tmp1 | cut -f1 | sort | uniq > _tmp2
echo " * making unique list of unicode characters meanings..."
rm -f _tmp3
cat _tmp2 | while read i ; do
sed -n "/^$i/p" _tmp1 | (read t ; echo "$t" >> _tmp3)
done
cp _tmp3 UnicodeChars
echo " * creating one-byte fallback tables..."
rm -f Fallbacks _tmp5
echo " - for latin capital letters..."
cat _tmp3 | grep 'LATIN CAPITAL LETTER [A-Z]$' > _tmp6
cat _tmp3 | grep 'LATIN CAPITAL LETTER [A-Z] WITH' >> _tmp6
cat _tmp6 | sort +2 > _tmp4
cat _tmp4 | while read i ; do
code=`echo $i | cut -c1-6`
fallb=`echo $i | cut -c8-29`
cat _tmp4 | fgrep "$fallb" | cut -c1-6 | (read i ;
echo "$code $i" >> _tmp5)
done
echo " - for latin small letters..."
cat _tmp3 | grep 'LATIN SMALL LETTER [A-Z]$' > _tmp6
cat _tmp3 | grep 'LATIN SMALL LETTER [A-Z] WITH' >> _tmp6
cat _tmp6 | sort +2 > _tmp4
cat _tmp4 | while read i ; do
code=`echo $i | cut -c1-6`
fallb=`echo $i | cut -c8-27`
cat _tmp4 | fgrep "$fallb" | cut -c1-6 | (read i ;
echo "$code $i" >> _tmp5)
done
add_fallback "DOUBLE .*QUOTATION MARK" "0x0022" "double quotations"
add_fallback "SINGLE .*QUOTATION MARK" "0x0027" "single quotations"
add_fallback "DASH" "0x002D" "dashes"
echo " * removing infinite loops from fallback tables..."
cat _tmp5 | grep -v '\(0x....\) \1' | sort > Fallbacks
rm -f _tmp1 _tmp2 _tmp3 _tmp4 _tmp5 _tmp6