1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/bootstrap/generated-dists/ubuntu1804-32bit/locale.sh
Stefan Metzmacher 95676825ad gitlab-ci: do some basic testing on ubuntu1804-32bit
For now we allow build warnings and only do some basic testing.
We also ignore timestamp related problems, as well as some charset
failures.

Over time we should try to address the situation by not allowing warnings
and verify if expected failures are harmless or not.

But it's already much better then having no 32bit testing at all!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Nov 24 12:05:26 UTC 2022 on sn-devel-184
2022-11-24 12:05:26 +00:00

55 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
#
# This file is generated by 'bootstrap/template.py --render'
# See also bootstrap/config.py
#
set -xueo pipefail
# refer to /usr/share/i18n/locales
INPUTFILE=en_US
# refer to /usr/share/i18n/charmaps
CHARMAP=UTF-8
# locale to generate in /usr/lib/locale
# glibc/localedef will normalize UTF-8 to utf8, follow the naming style
LOCALE=$INPUTFILE.utf8
# if locale is already correct, exit
( locale | grep LC_ALL | grep -i $LOCALE ) && exit 0
# if locale not available, generate locale into /usr/lib/locale
if ! ( locale --all-locales | grep -i $LOCALE )
then
# no-archive means create its own dir
localedef --inputfile $INPUTFILE --charmap $CHARMAP --no-archive $LOCALE
fi
# update locale conf and global env file
# set both LC_ALL and LANG for safe
# update conf for Debian family
FILE=/etc/default/locale
if [ -f $FILE ]
then
echo LC_ALL="$LOCALE" > $FILE
echo LANG="$LOCALE" >> $FILE
fi
# update conf for RedHat family
FILE=/etc/locale.conf
if [ -f $FILE ]
then
# LC_ALL is not valid in this file, set LANG only
echo LANG="$LOCALE" > $FILE
fi
# update global env file
FILE=/etc/environment
if [ -f $FILE ]
then
# append LC_ALL if not exist
grep LC_ALL $FILE || echo LC_ALL="$LOCALE" >> $FILE
# append LANG if not exist
grep LANG $FILE || echo LANG="$LOCALE" >> $FILE
fi