23 lines
639 B
Bash
23 lines
639 B
Bash
#!/bin/bash
|
|
|
|
## Script Location
|
|
SCRIPTDIR=$(dirname $0)
|
|
source "$SCRIPTDIR/common/colors.sh"
|
|
source "$SCRIPTDIR/common/functions.sh"
|
|
source "$SCRIPTDIR/common/load-defaults.sh"
|
|
|
|
current_lang=$(locale | grep LANG= | cut -d= -f2)
|
|
printf "$COL_LIGHT_BLUE" "* locale is currently set to $current_lang"
|
|
if [ "$desired_locale" == "ask" ]; then
|
|
dpkg-reconfigure locales
|
|
else
|
|
|
|
update-locale "$desired_locale"
|
|
locale-gen --purge "$desired_locale"
|
|
dpkg-reconfigure --frontend noninteractive locales
|
|
. /etc/default/locale
|
|
|
|
fi
|
|
current_lang=$(locale | grep LANG= | cut -d= -f2)
|
|
printf "$COL_LIGHT_BLUE" "* locale is now set to $current_lang"
|