From 964da15a0b84f8e5f00e8abac2f7dfda0bf60488 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 3 May 2024 12:37:23 +1000 Subject: Add the collation partition to the build Includes a small linux-only bash script to generate locale partitions --- tools/collate/mkcollator.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tools/collate/mkcollator.sh (limited to 'tools/collate/mkcollator.sh') diff --git a/tools/collate/mkcollator.sh b/tools/collate/mkcollator.sh new file mode 100755 index 00000000..e5962429 --- /dev/null +++ b/tools/collate/mkcollator.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -eu + +if [ -z "${2:-}" ]; then + name="Generic" + locale="iso14651_t1" +else + name="$1" + locale="$2" +fi + +working_dir=$(mktemp -d) + +echo -n "$name" | dd iflag=fullblock bs=8 count=1 conv=sync of="$working_dir/name" +localedef -f UTF-8 -i "$locale" --no-archive "$working_dir" || true +cat "$working_dir/name" "$working_dir/LC_COLLATE" > "$name.LC_COLLATE" -- cgit v1.2.3