File: kinput2-wnn.postinst

package info (click to toggle)
kinput2 3.1-13
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 3,028 kB
  • ctags: 5,584
  • sloc: ansic: 49,965; makefile: 104; sh: 68
file content (30 lines) | stat: -rw-r--r-- 821 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
set -e

update-alternatives --install /usr/bin/kinput2 kinput2 /usr/bin/kinput2-wnn 30 --slave /usr/share/man/man1/kinput2.1x.gz kinput2.1x.gz /usr/share/man/man1/kinput2-wnn.1x.gz
update-alternatives \
        --install /etc/X11/xinit/xinput.d/ja_JP xinput-ja_JP \
        /etc/X11/xinit/xinput.d/kinput2-wnn 60

. /usr/share/debconf/confmodule

if [ -f /etc/X11/Xresources/kinput2-common ]; then
    rm -f /etc/X11/Xresources/kinput2-common
fi

XRESOURCE=/etc/X11/Xresources/kinput2

if [ ! -f $XRESOURCE ]; then cat << EOF > $XRESOURCE
Kinput2*CcWnn.ccdef: ccdef.kinput2
EOF
fi

db_get shared/kinput2/wnn/keybindings
if [ "$RET" = "Egg" ]; then
    POSTFIX=".egg"
fi
sed "s/\(Kinput2\*CcWnn\.ccdef:\).*/\1\ ccdef.kinput2$POSTFIX/g" < $XRESOURCE > $XRESOURCE.new

mv -f $XRESOURCE.new $XRESOURCE

#DEBHELPER#