#!/bin/bash -p

#
#    Take a list of acl files (word autocorrect lists),
#    extract the word pairs from them,
#    and combine all of them to a vim "iab" file.
#
#    Synopsis: combine *.acl
#    Output: file "wordlist"
#
# Needs the program extract-acl
#


echo extracting ...
fls=""
for f
do
	echo $f ...
	extract-acl $f 1> ${f}iab 
	fls="$fls ${f}iab"
done

echo merging $fls ...
sort -u $fls > wordlist

rm -f $fls

echo 
echo Now merge \"wordlist\" with your existing .vimrc.wordlist
echo with the command
echo sort -u wordlist .vimrc.wordlist > vimrc.wordlist
echo

