#!/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 sed -i -e 's/XKBLAYOUT=.*/XKBLAYOUT="hr"/g' /etc/default/keyboard 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\" update-initramfs -u setupcon -k -f fi