smart_write

This commit is contained in:
pvincent
2026-09-02 00:00:36 +04:00
parent b8af563b00
commit 2971ffdd80
2 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -238,8 +238,9 @@ function fix_locales {
done
for locale in "${!found_locales[@]}"; do
if [[ ${found_locales[$locale]} == 'false' ]]; then
local language="${locale:0:5}"
echo "Locale: $locale missing"
sudo sed -i "s/^# *\(${locale:0:5}\.UTF-8\)/\1/" /etc/locale.gen
sudo /opt/miaou-bash/tools/smart_write /etc/locale.gen "(^# )?${language}\.UTF-8 UTF-8" "${language}.UTF-8 UTF-8"
should_regenerate=true
fi
done