Added Debian Settings for HR Locales

This commit is contained in:
Ivan Jurišić 2024-02-19 13:16:25 +01:00
parent 0974f50f63
commit 1f01b4e69a

44
debian/settings/set-hr-locales.sh vendored Executable file
View File

@ -0,0 +1,44 @@
#!/bin/bash
#### Functions
check_root() {
if [ "$EUID" -ne 0 ]; then
echo "Must be root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true
do
read -rN1 input
case $input in
[yY][eE][sS]|[yY])
return 0
break
;;
[nN][oO]|[nN])
return 1
;;
esac
done
}
#### Main
check_root
echo -ne "\nSet Croatian Time,Numeric,Collate and Monetary Locales ? "
if choice 2>/dev/null; then
sed -i -e 's/# hr_HR.UTF-8 UTF-8/hr_HR.UTF-8 UTF-8/g' /etc/locale.gen
locale-gen
update-locale LC_TIME=\"hr_HR.UTF-8\"
update-locale LC_NUMERIC=\"hr_HR.UTF-8\"
update-locale LC_COLLATE=\"hr_HR.UTF-8\"
update-locale LC_MONETARY=\"hr_HR.UTF-8\"
echo -ne "\nPlease reboot system\n"
fi