summaryrefslogtreecommitdiffstats
path: root/debian/scripts/locale-gen
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:07:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:07:31 +0000
commitedaebb65d92a48d7075c8c1f64c5ffd87054827b (patch)
tree045c941e1851cde1665bea22d97a2976b7a5bb69 /debian/scripts/locale-gen
parentAdding upstream version 4:7.4.7. (diff)
downloadlibreoffice-edaebb65d92a48d7075c8c1f64c5ffd87054827b.tar.xz
libreoffice-edaebb65d92a48d7075c8c1f64c5ffd87054827b.zip
Adding debian version 4:7.4.7-1+deb12u1.debian/4%7.4.7-1+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/scripts/locale-gen')
-rwxr-xr-xdebian/scripts/locale-gen32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/scripts/locale-gen b/debian/scripts/locale-gen
new file mode 100755
index 000000000..c7334fdb7
--- /dev/null
+++ b/debian/scripts/locale-gen
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# generate locales that uicheck depend on
+# "stolen" from gcc
+
+LOCPATH=`pwd`/debian/locales
+export LOCPATH
+
+[ -d $LOCPATH ] || mkdir -p $LOCPATH
+
+[ -n "$USE_CPUS" ] || USE_CPUS=1
+
+umask 022
+
+echo "Generating locales..."
+xargs -L 1 -P $USE_CPUS -I{} \
+ sh -c '
+ set {}; locale=$1; charset=$2
+ case $locale in \#*) exit;; esac
+ [ -n "$locale" -a -n "$charset" ] || exit
+ echo " `echo $locale | sed \"s/\([^.\@]*\).*/\1/\"`.$charset`echo $locale | sed \"s/\([^\@]*\)\(\@.*\)*/\2/\"`..."
+ if [ -f $LOCPATH/$locale ]; then
+ input=$locale
+ else
+ input=`echo $locale | sed "s/\([^.]*\)[^@]*\(.*\)/\1\2/"`
+ fi
+ localedef -i $input -c -f $charset $LOCPATH/$locale #-A /etc/locale.alias
+ ' <<EOF
+en_US.UTF-8 UTF-8
+EOF
+
+echo "Generation complete."