#! /bin/bash . /etc/utt/compdic.conf while [ $# -gt 2 ] do case $1 in -d) dictionary_home=$2 shift 2 ;; *) echo "The arguments to use are" echo "-d " shift 1 ;; esac done if [ $# -lt 2 ] then echo "Usage:" echo " compdic-update [-d ] ..." echo "where" echo " - dictionary home directory" echo " - dictionary name" echo " - diff format file containing paths to be added/removed from dictionary" exit 0 fi fst=$dictionary_home/$1.fst cats=$dictionary_home/$1.cats bin=$dictionary_home/$1.bin shift 1 diffs=$* echo running "compdic-update-fst $fst $diffs" compdic-update-fst $fst $diffs echo running "compdic-fst-to-bin $fst $bin" compdic-fst-to-bin $fst $bin echo running "compdic-update-cats $cats $diffs" compdic-update-cats $cats $diffs