diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-05-03 12:37:23 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-05-03 12:37:23 +1000 |
| commit | 964da15a0b84f8e5f00e8abac2f7dfda0bf60488 (patch) | |
| tree | 4dc977f8789ca379cf8dc60c45eaa0fb57a9fce1 /tools/collate/mkcollator.sh | |
| parent | a231fd1c8afedbeb14b0bc77d76bad61db986059 (diff) | |
| download | tangara-fw-964da15a0b84f8e5f00e8abac2f7dfda0bf60488.tar.gz | |
Add the collation partition to the build
Includes a small linux-only bash script to generate locale partitions
Diffstat (limited to 'tools/collate/mkcollator.sh')
| -rwxr-xr-x | tools/collate/mkcollator.sh | 16 |
1 files changed, 16 insertions, 0 deletions
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" |
