summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2013-11-06 13:03:47 +0000
committerWinterFairy <winterfairy@riseup.net>2013-11-06 19:22:57 +0000
commitaaf88724948a393bacc02daa1a2f3d37b14a49f8 (patch)
treec9a61edb3f29a7b222977acd0f4e90e960a61ea4
parent47bfd8927e4b9fc8e4115d1026ee30ab510f089a (diff)
Use a case construct.
-rw-r--r--config/chroot_local-includes/etc/X11/Xsession.d/80im-starter18
1 files changed, 10 insertions, 8 deletions
diff --git a/config/chroot_local-includes/etc/X11/Xsession.d/80im-starter b/config/chroot_local-includes/etc/X11/Xsession.d/80im-starter
index b84ed95..4565922 100644
--- a/config/chroot_local-includes/etc/X11/Xsession.d/80im-starter
+++ b/config/chroot_local-includes/etc/X11/Xsession.d/80im-starter
@@ -10,15 +10,17 @@
# Deside order in which input methods are preferred
# (chinese needs pinyin, japanese needs anthy, korean needs hangul)
LANGPREFIX=`echo "$LANG" | sed 's/_.*//'`
-PREFLIST="[pinyin,anthy,hangul]"
-if [ "$LANGPREFIX" = "ja" ]; then
- PREFLIST="[anthy,pinyin,hangul]"
-fi
-
-if [ "$LANGPREFIX" = "ko" ]; then
- PREFLIST="[hangul,pinyin,anthy]"
-fi
+case "$LANGPREFIX" in
+ ja)
+ PREFLIST="[anthy,pinyin,hangul]"
+ ;;
+ ko)
+ PREFLIST="[hangul,pinyin,anthy]"
+ ;;
+ *)
+ PREFLIST="[pinyin,anthy,hangul]"
+esac
# Configure enabled input methods and their preferred order
gconftool-2 --type=list --list-type=string --set \