Last change
on this file was
c03f8a5,
checked in by Tomasz Obrebski <obrebski@…>, 10 years ago
|
minor fixes
|
-
Property mode set to
100755
|
File size:
1016 bytes
|
Line | |
---|
1 | #! /bin/bash |
---|
2 | |
---|
3 | . /etc/utt/compdic.conf |
---|
4 | |
---|
5 | while [ $# -gt 2 ] |
---|
6 | do |
---|
7 | case $1 |
---|
8 | in |
---|
9 | -d) |
---|
10 | dictionary_home=$2 |
---|
11 | shift 2 |
---|
12 | ;; |
---|
13 | |
---|
14 | *) |
---|
15 | echo "The arguments to use are" |
---|
16 | echo "-d <dictionary-home-dir>" |
---|
17 | shift 1 |
---|
18 | ;; |
---|
19 | esac |
---|
20 | done |
---|
21 | |
---|
22 | |
---|
23 | if [ $# -lt 2 ] |
---|
24 | then |
---|
25 | echo "Usage:" |
---|
26 | echo " compdic-update [-d <dictionary-home-dir>] <dictionary-name> <difference> <difference> ..." |
---|
27 | echo "where" |
---|
28 | echo " <dictionary-home-dir> - dictionary home directory" |
---|
29 | echo " <dictionary-name> - dictionary name (without extension)" |
---|
30 | echo " <difference> - diff format file containing paths to be added/removed from dictionary" |
---|
31 | exit 0 |
---|
32 | fi |
---|
33 | |
---|
34 | fst=$dictionary_home/$1.fst |
---|
35 | cats=$dictionary_home/$1.cats |
---|
36 | bin=$dictionary_home/$1.bin |
---|
37 | shift 1 |
---|
38 | diffs=$* |
---|
39 | |
---|
40 | echo running "compdic-update-fst $fst $diffs" |
---|
41 | compdic-update-fst $fst $diffs |
---|
42 | |
---|
43 | echo running "compdic-fst-to-bin $fst $bin" |
---|
44 | compdic-fst-to-bin $fst $bin |
---|
45 | |
---|
46 | echo running "compdic-update-cats $cats $diffs" |
---|
47 | compdic-update-cats $cats $diffs |
---|
Note: See
TracBrowser
for help on using the repository browser.