diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-08-19 18:41:56 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-08-19 18:41:56 -0400 |
commit | 4474c62e3c17d08820e3b4c09f49e23a2e250c61 (patch) | |
tree | 9773ccb048911436b1f9e2c70e4403031990622f | |
parent | 8e999aa7eb8f742c9ec78e2fc0c46acc8b740187 (diff) |
pull utf-8 setup in to a module
-rw-r--r-- | osi-mk.d/utf8.sh | 12 | ||||
-rwxr-xr-x | runtests | 7 |
2 files changed, 13 insertions, 6 deletions
diff --git a/osi-mk.d/utf8.sh b/osi-mk.d/utf8.sh new file mode 100644 index 0000000..8d125c4 --- /dev/null +++ b/osi-mk.d/utf8.sh @@ -0,0 +1,12 @@ +#!/hint/bash -euE +# Copyright (C) 2018 Luke Shumaker +# SPDX-License-Identifier: AGPL-3.0-or-later + +post_install+=(10:utf8:post_install) +utf8:post_install() { + local arg_mountpoint=$1 + + echo en_US.UTF-8 UTF-8 >"${arg_mountpoint}/etc/locale.gen" + echo LANG=en_US.UTF-8 >"${arg_mountpoint}/etc/locale.conf" + arch-chroot -- "$arg_mountpoint" locale-gen +} @@ -46,6 +46,7 @@ check: ${WORKDIR}/build-232/pkgdest # osi-mk base images ########################################################### ${WORKDIR}/base.raw: osi-mk.d/systemd-osi-shell.sh +${WORKDIR}/base.raw: osi-mk.d/utf8.sh ${WORKDIR}/base.raw: rm -f -- '$@' '$@.tmp' mkdir -p -- '$(@D)' @@ -190,12 +191,6 @@ ${WORKDIR}/build-$(COMMIT)/build.log: %/build.log: %/build.raw --size=5G \ --package=python-pyparsing \ '$@.tmp' - ./osi-shell '$<' <<-'EOF' - set -e - echo en_US.UTF-8 UTF-8 >/etc/locale.gen - echo LANG=en_US.UTF-8 >/etc/locale.conf - locale-gen - EOF mv -T -- '$@.tmp' '$@' %/sd-tests-unit.log: %/sd-tests-unit.raw ./osi-shell '$<' <<-'EOF' |& tee '$@.tmp' |