From 6be00f16558e7026d1d8fed071626df4f4b48d05 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 31 Aug 2024 09:59:39 +0200 Subject: [PATCH] locales --- spcd/bootstrap.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index ba26ddc..ae8d7ec 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1180,21 +1180,20 @@ spcd_step__packages_install_locales() { case "${SPCD_PM}" in "${SPCD_PM_APK}") spcd_install_package "musl-locales" ;; "${SPCD_PM_APT}") - unset spcd_step__pil__text - for spcd_step__pil__locale in "${@}"; do - spcd_step__pil__text="${spcd_step__pil__text}\ -${spcd_step__pil__locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET} + local locale text + for locale in "${@}"; do + text="${text}\ +${locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET} " done - spcd_os_write "/etc/locale.gen" "${spcd_step__pil__text}" + spcd_os_write "/etc/locale.gen" "${text}" spcd_install_package "locales" ;; "${SPCD_PM_DNF}") - for spcd_step__pil__locale in "${@}"; do - spcd_step__pil__lang="$( - echo "${spcd_step__pil__locale}" | cut -d _ -f 1 - )" - spcd_install_package "glibc-langpack-${spcd_step__pil__lang}" + local locale language + for locale in "${@}"; do + language="$(echo "${locale}" | cut -d _ -f 1)" + spcd_install_package "glibc-langpack-${language}" done ;; "${SPCD_PM_PACMAN}") spcd_install_package "glibc-locales" ;;