From f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 17:07:22 +0200 Subject: Adding upstream version 3.38.6. Signed-off-by: Daniel Baumann --- data/update-osk-layouts.sh | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 data/update-osk-layouts.sh (limited to 'data/update-osk-layouts.sh') diff --git a/data/update-osk-layouts.sh b/data/update-osk-layouts.sh new file mode 100755 index 0000000..8d78c0e --- /dev/null +++ b/data/update-osk-layouts.sh @@ -0,0 +1,47 @@ +#!/bin/env bash + +CLDR_LAYOUTS_TARBALL="http://www.unicode.org/Public/cldr/latest/keyboards.zip" + +WORKDIR=".osk-layout-workbench" +CLDR2JSON="cldr2json/cldr2json.py" +SRCDIR="$WORKDIR/keyboards/android" +DESTDIR="osk-layouts" +GRESOURCE_FILE="gnome-shell-osk-layouts.gresource.xml" +TMP_GRESOURCE_FILE=".$GRESOURCE_FILE.tmp" + +cd `dirname $0` + +# Ensure work/dest dirs +rm -rf $WORKDIR +mkdir -p $WORKDIR +mkdir -p "osk-layouts" + +# Download stuff on the work dir +pushd $WORKDIR +gio copy $CLDR_LAYOUTS_TARBALL . +unzip keyboards.zip +popd + +# Transform to JSON files +$CLDR2JSON $SRCDIR $DESTDIR + +# Generate new gresources xml file +cat >$TMP_GRESOURCE_FILE < + + +EOF + +for f in $DESTDIR/*.json +do + echo " $(basename $f)" >>$TMP_GRESOURCE_FILE +done + +cat >>$TMP_GRESOURCE_FILE <emoji.json + + +EOF + +# Rewrite old gresources xml +mv $TMP_GRESOURCE_FILE $GRESOURCE_FILE -- cgit v1.2.3