From dc51f1eba6f4f83a8577bc3cb0bbd86cb238a182 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 4 Sep 2024 14:44:39 +0200 Subject: [PATCH] mv --- spcd/bootstrap.sh | 84 +++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 48c0d67..be162b6 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -377,48 +377,6 @@ spcd_txt_get() { esac } -spcd_txt_locales_echo() { - spcd_os_printenv "LANGUAGE" - locale --all-locales -} - -spcd_txt_locales() { - set -- \ - "${SPCD_TXT_LOCALE_ENGLISH}" \ - "${SPCD_TXT_LOCALE_FRENCH}" - local language locale text - spcd_txt_locales_echo - spcd_split - for locale in "${@}"; do - case "${1}" in - "glibc-langpack-") - language="$(echo "${locale}" | cut -d _ -f 1)" - spcd_install_package "glibc-langpack-${language}" - ;; - "LANGUAGE") - if [ -n "${text}" ]; then - text="${text}:${locale}" - else - text="${locale}" - fi - ;; - "locale.gen") - text="${text}\ -${locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET} -" - ;; - *) ;; - esac - done - case "${1}" in - "LANGUAGE") export LANGUAGE="${text}" ;; - "locale.gen") spcd_os_write "/etc/locale.gen" "${text}" ;; - *) ;; - esac - spcd_split - spcd_txt_locales_echo -} - # ╭──────╮ # │ step │ # ╰──────╯ @@ -961,6 +919,48 @@ spcd_txt_locale() { esac } +spcd_txt_locales_echo() { + spcd_os_printenv "LANGUAGE" + locale --all-locales +} + +spcd_txt_locales() { + set -- \ + "${SPCD_TXT_LOCALE_ENGLISH}" \ + "${SPCD_TXT_LOCALE_FRENCH}" + local language locale text + spcd_txt_locales_echo + spcd_split + for locale in "${@}"; do + case "${1}" in + "glibc-langpack-") + language="$(echo "${locale}" | cut -d _ -f 1)" + spcd_install_package "glibc-langpack-${language}" + ;; + "LANGUAGE") + if [ -n "${text}" ]; then + text="${text}:${locale}" + else + text="${locale}" + fi + ;; + "locale.gen") + text="${text}\ +${locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET} +" + ;; + *) ;; + esac + done + case "${1}" in + "LANGUAGE") export LANGUAGE="${text}" ;; + "locale.gen") spcd_os_write "/etc/locale.gen" "${text}" ;; + *) ;; + esac + spcd_split + spcd_txt_locales_echo +} + # ╭──────┬─────╮ # │ step │ dns │ # ╰──────┴─────╯