replace LANG with LC_ALL

This commit is contained in:
Tobias Powalowski 2024-06-20 16:03:58 +02:00
parent 5814c6a9f1
commit 3c67a19376
8 changed files with 9 additions and 12 deletions

View file

@ -2,7 +2,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org>
# source base and common first, contains basic parameters
LANG=C
. /usr/lib/archboot/common.sh
. /usr/lib/archboot/installer/common.sh
. /usr/lib/archboot/installer/base.sh

View file

@ -2,7 +2,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_LANG=C
_LOG=testsuite.log
_APPNAME=${0##*/}
_usage () {

View file

@ -264,7 +264,7 @@ _fix_network() {
_create_archboot_db() {
echo "Creating archboot repository db..."
#shellcheck disable=SC2046
LANG=C repo-add -q "${1}"/archboot.db.tar.gz $(fd -u -t f -E '*.sig' . "${1}"/)
LC_ALL=C.UTF-8 repo-add -q "${1}"/archboot.db.tar.gz $(fd -u -t f -E '*.sig' . "${1}"/)
}
_pacman_parameters() {

View file

@ -252,8 +252,8 @@ _create_cpio() {
fd . -u --min-depth 1 -X touch -hcd "@0"
# use zstd only it has best compression and decompression
fd . -u --min-depth 1 -0 | sort -z |
LANG=C bsdtar --null -cnf - -T - |
LANG=C bsdtar --null -cf - --format=newc @- |
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @- |
zstd -T0 -19 > "${_GENERATE_IMAGE}" || _abort "Image creation failed!"
popd >"${_NO_LOG}" || return
}

View file

@ -1,7 +1,6 @@
#!/usr/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org>
LANG=C
_KVER="$(uname -r)"
_ARCH="$(uname -m)"
_TITLE="archboot.com | ${_ARCH} | ${_KVER} | Basic Setup | Early Userspace"

View file

@ -38,8 +38,8 @@ _compress_initrd() {
fd . -u --min-depth 1 -X touch -hcd "@0"
# use zstd only it has best compression and decompression
fd . -u --min-depth 1 -0 | sort -z |
LANG=C bsdtar --null -cnf - -T - |
LANG=C bsdtar --null -cf - --format=newc @- |
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @- |
zstd -T0 -19 > "../../${1}" || exit 1
popd >"${_NO_LOG}" || return
echo "Build complete."

View file

@ -25,7 +25,7 @@ _cleanup() {
_run_pacman() {
for i in ${1}; do
#shellcheck disable=SC2086
LANG=C pacman -Sy ${i} --noconfirm &>"${_LOG}"
LC_ALL=C.UTF-8 pacman -Sy ${i} --noconfirm &>"${_LOG}"
if [[ ! -e "/.full_system" ]]; then
_cleanup
fi
@ -41,7 +41,7 @@ _IGNORE=""
done
fi
#shellcheck disable=SC2086
LANG=C pacman -Syu ${_IGNORE} --noconfirm &>"${_LOG}"
LC_ALL=C.UTF-8 pacman -Syu ${_IGNORE} --noconfirm &>"${_LOG}"
if [[ ! -e "/.full_system" ]]; then
_cleanup
fi

View file

@ -131,8 +131,8 @@ _create_initramfs() {
cd "${_ROOTFS_DIR}" || exit 1
fd . -u --min-depth 1 -0 |
sort -z |
LANG=C bsdtar --null -cnf - -T - |
LANG=C bsdtar --null -cf - --format=newc @- |
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @- |
zstd --rm -T0> "${_RAM}/${_INITRD}" &
sleep 2
while pgrep -x zstd &>"${_NO_LOG}"; do