wiki.techinc.nl/maintenance/language/generate-collation-data
Timo Tijhof 3186d2d04b collation: Move first-letters-root to includes/collation/data
For consistency with other data files. Also, like the other data files:

* For automated fetching of the Unicode files,
  move the steps from Makefile to a bash script.

* Switch to a static array file format.

Change-Id: If07487950a270283b8eaeda9a507e723ed2d89c4
2018-08-01 22:40:22 +00:00

19 lines
516 B
Bash

#!/bin/bash -eu
clear_temp() {
rm -f allkeys.txt ucd.all.grouped.zip ucd.all.grouped.xml
}
# Setup
clear_temp
export MW_INSTALL_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd)"
# Generate includes/collation/data/first-letters-root.php
wget https://www.unicode.org/Public/UCA/6.0.0/allkeys.txt
wget https://www.unicode.org/Public/6.0.0/ucdxml/ucd.all.grouped.zip
unzip ucd.all.grouped.zip ucd.all.grouped.xml
php "$MW_INSTALL_PATH/maintenance/language/generateCollationData.php"
# Teardown
clear_temp