summaryrefslogtreecommitdiff
path: root/sources/languages
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-15 16:57:17 +0100
committerJochen Topf <jochen@topf.org>2013-01-15 16:57:17 +0100
commitecda56a56cf4b334f5ceb74e2987b55d9653f2e0 (patch)
treea35d3e232c7b4d8b049c2f360059ebdbe9f6ef35 /sources/languages
parent664b20244e12d17672f93960597b6395a09dd153 (diff)
downloadtaginfo-ecda56a56cf4b334f5ceb74e2987b55d9653f2e0.tar
taginfo-ecda56a56cf4b334f5ceb74e2987b55d9653f2e0.tar.gz
Get CLDR language infos in languages source
Diffstat (limited to 'sources/languages')
-rwxr-xr-xsources/languages/update.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/sources/languages/update.sh b/sources/languages/update.sh
index 26a374a..4604f7d 100755
--- a/sources/languages/update.sh
+++ b/sources/languages/update.sh
@@ -10,6 +10,9 @@ set -e
DIR=$1
REGISTRY_URL="http://www.iana.org/assignments/language-subtag-registry"
REGISTRY_FILE="$DIR/language-subtag-registry"
+CLDR_URL="http://unicode.org/Public/cldr/latest/core.zip"
+CLDR_FILE="$DIR/cldr-core.zip"
+CLDR_DIR="$DIR/cldr"
DATECMD='date +%Y-%m-%dT%H:%M:%S'
@@ -36,6 +39,14 @@ curl --silent --time-cond $REGISTRY_FILE --output $REGISTRY_FILE $REGISTRY_URL
echo "`$DATECMD` Running import..."
./import_subtag_registry.rb $DIR
+echo "`$DATECMD` Getting CLDR..."
+curl --silent --location --time-cond $CLDR_FILE --output $CLDR_FILE $CLDR_URL
+
+echo "`$DATECMD` Unpacking CLDR..."
+rm -fr $CLDR_DIR
+mkdir $CLDR_DIR
+unzip -q -d $CLDR_DIR $CLDR_FILE
+
echo "`$DATECMD` Running post.sql..."
sqlite3 $DATABASE <post.sql