# perl se buni ako nema postavljen defaultni locale
# stavit cemo en_US.UTF-8
-if [ ! grep -q "^en_US.UTF-8 UTF-8" /etc/locale.gen ]; then
+if [ ! $(grep -q "^en_US.UTF-8 UTF-8" /etc/locale.gen) ]; then
# generirat cemo najpotrebnije locale (HR, EN, te HR.UTF i EN.UTF8)
cp_check_and_sed '# en_US.UTF-8 UTF-8' \
's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' \
fi
# Ako ima već neki default ne diramo ga
-if [ ! -f /etc/default/locale ]; then
- cat > /etc/default/locale <<EOF
+if [ -f /etc/default/locale ]; then
+ if [ ! $(grep -q "^LANG" /etc/default/locale) ]; then
+ cat > /etc/default/locale <<EOF
LANG=en_US.UTF-8
LANGUAGE="en_US:en"
EOF
+ fi
update-locale
fi