Tagging release version 0.6.0
[mdictionary] / add_dict
1 #!/bin/bash
2
3 if [ -z $1 ]; then
4         echo -e "\n* AddDict utility - tool for adding dictionaries to GConf *\n"
5         echo -e "Usage:\n\n./add_dict <dictionary_file> <name_of_dictionary>\n"
6         
7 else
8         if [ -z $2 ]; then
9                 echo "Dictionary name wasn't specified. Run without parameters to get help."
10         else
11                 if [ -e $1 ]; then
12                         gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/$2/name "$2"
13                         gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/$2/path "`pwd`/$1"
14                         gconftool-2 --type boolean --set /apps/maemo/WhiteStork/Dictionaries/$2/active false
15                         gconftool-2 --type boolean --set /apps/maemo/WhiteStork/Dictionaries/$2/optimized false
16                         gconftool-2 -R /apps/maemo/WhiteStork/Dictionaries/$2
17                 else
18                         echo "Dictionary file couldn't be found. Run without parameters to get help."
19                         
20                 fi
21                 
22         fi
23 fi