File: ng

package info (click to toggle)
ng 1.5~beta1-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,140 kB
  • sloc: ansic: 43,437; asm: 3,150; sh: 2,539; cpp: 1,234; makefile: 630
file content (44 lines) | stat: -rw-r--r-- 1,314 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Copyright (c) 2000 Yasuhiro Take <take@debian.org>
# Copyright (c) 1999 Fumitoshi UKAI <ukai@debian.or.jp>
# Copyright (c) 1999 Jacobo Tarrio Barreiro <jtarrio@iname.com>
# This program is covered by the GNU General Public License version 2
#

if [ -n "$NG" ]; then
  test -x /usr/bin/$NG && exec /usr/bin/$NG "$@"
fi

test -x /usr/bin/ng-cjk-canna && NG=/usr/bin/ng-cjk-canna
test -x /usr/bin/ng-cjk && NG=/usr/bin/ng-cjk
test -x /usr/bin/ng-latin && NG=/usr/bin/ng-latin

if [ -x /usr/bin/locale ]; then
  eval `locale`
fi
locale=${LC_ALL:-$LANG}

case X"$locale" in
  Xja|Xja_JP|Xja_JP.*)
    [ -x /usr/bin/ng-latin ] && NG=/usr/bin/ng-latin
    [ -x /usr/bin/ng-cjk ] && NG=/usr/bin/ng-cjk
    [ -x /usr/bin/ng-cjk-canna ] && NG=/usr/bin/ng-cjk-canna
    ;;
  Xko|Xko_KR|Xko_KR.*|Xzh|Xzh_CN|Xzh_CN.*)
    [ -x /usr/bin/ng-latin ] && NG=/usr/bin/ng-latin
    [ -x /usr/bin/ng-cjk-canna ] && NG=/usr/bin/ng-cjk-canna
    [ -x /usr/bin/ng-cjk ] && NG=/usr/bin/ng-cjk
    ;;
  *)
    [ -x /usr/bin/ng-cjk-canna ] && NG=/usr/bin/ng-cjk-canna
    [ -x /usr/bin/ng-cjk ] && NG=/usr/bin/ng-cjk
    [ -x /usr/bin/ng-latin ] && NG=/usr/bin/ng-latin
    ;;
esac

if [ -n $NG ]; then
  exec $NG "$@"
else
  echo "Neither ng-latin, ng-cjk, nor ng-cjk-canna found."
  echo "Please install what you prefer."
fi