projects
/
carnet-upgrade.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5036c2b
)
Ispravke postinst i pinning
author
Zeljko Boros
<Zeljko.Boros@carnet.hr>
Mon, 10 May 2021 12:41:44 +0000
(14:41 +0200)
committer
Zeljko Boros
<Zeljko.Boros@carnet.hr>
Mon, 10 May 2021 12:41:44 +0000
(14:41 +0200)
debian/postinst
patch
|
blob
|
history
diff --git
a/debian/postinst
b/debian/postinst
index
dd536da
..
e1f51d8
100644
(file)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-16,7
+16,7
@@
fi
# perl se buni ako nema postavljen defaultni locale
# stavit cemo en_US.UTF-8
# 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' \
# 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' \
@@
-38,11
+38,13
@@
if [ ! grep -q "^en_US.UTF-8 UTF-8" /etc/locale.gen ]; then
fi
# Ako ima već neki default ne diramo ga
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
LANG=en_US.UTF-8
LANGUAGE="en_US:en"
EOF
+ fi
update-locale
fi
update-locale
fi