source: src/compdic/compdic-update @ 555c7f8

Last change on this file since 555c7f8 was 555c7f8, checked in by Tomasz Obrebski <to@…>, 11 years ago

dodanie mo�liwo�ci szybkiego uaktualniania s�ownika dla lema

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