#!/bin/bash ## Guillaume DURR # gdurr@free.fr # # Merge 2 dictionaries on Mac OS X ############################### History ################################ # 7 august 07 0.1 first release, tested with tiger only ################################################################################ ############################### Configure ################################### #name of the dict in ~/Library/spelling/* LANG=fr #URL on webbsite REMOTESPELLING=http://somewhere/folder/$LANG # FTP info for upload FTPHOST= FTPUSER= FTPPASSWORD= FTPSPELLING= ############################### End Configure ################################### SPELLINGFILE=~/Library/Spelling/$LANG ########################################################################################### rm /tmp/result /tmp/f1 /tmp/f2 tr "\000" "\n" < $SPELLINGFILE > /tmp/f1 curl --fail -o /tmp/f2 $REMOTESPELLING if [ ! -f /tmp/f2 ]; then # first time, uploading file ftp -n $FTPHOST < /tmp/result tr "\n" "\000" < /tmp/result > $SPELLINGFILE # uploding merged file ftp -n $FTPHOST <