One of the basic steps in setting up a new system is getting the right glibc locale files generated. At least in ArchLinux and Gentoo, one is expected to do this step by hand. I am trying to setup a script that deploys ArchLinux. For various reasons, my script is limited by not knowing where in the config process it is and testing for each step as it goes along. The process includes several reboots.Throwing the right locale into /etc/locale.gen and running local-gen every time doesn't seem to hurt, but on the embeded platform I'm using it takes a long time and running this several times really hurts.What would be the proper way to test this -- not just that a locale is set in the config but that the proper files for it are generated?
How would a script know when running locale-gen is necessary?
arch linux;scripting;system installation;locale
/usr/bin/locale -a prints the list of already generated locales found in /usr/lib/locale/locale-archive. (and the POSIX and C locale)$ locale -aCPOSIXde_DE.utf8en_US.utf8