source: src/compdic/compdic-update @ c03f8a5

Last change on this file since c03f8a5 was c03f8a5, checked in by Tomasz Obrebski <obrebski@…>, 10 years ago

minor fixes

  • Property mode set to 100755
File size: 1016 bytes
RevLine 
[555c7f8]1#! /bin/bash
2
3. /etc/utt/compdic.conf
4
5while [ $# -gt 2 ]
6do
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
20done
21
22
23if [ $# -lt 2 ]
24then
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"
[c03f8a5]29    echo "    <dictionary-name>     - dictionary name (without extension)"
[555c7f8]30    echo "    <difference>          - diff format file containing paths to be added/removed from dictionary"
31    exit 0
32fi     
33
34fst=$dictionary_home/$1.fst
35cats=$dictionary_home/$1.cats
36bin=$dictionary_home/$1.bin
37shift 1
38diffs=$*
39
40echo running "compdic-update-fst $fst $diffs"
41compdic-update-fst $fst $diffs
42
43echo running "compdic-fst-to-bin $fst $bin"
44compdic-fst-to-bin $fst $bin
45
46echo running "compdic-update-cats $cats $diffs"
47compdic-update-cats $cats $diffs
Note: See TracBrowser for help on using the repository browser.