#!/bin/sh

# Ispell compatibility script for Aspell

command=""

for p 
do
  case $p in 
  -a|-A|-l|-c|-e*|-v*|-D) command=$p ;; 
  -*                    ) ;;
  *                     ) command=${command:="-"} ;;
  esac
done

case $command in
-A|-c|-e*|-d) echo "Aspell does not support the $command mode.";;
-a|-l|-v*   ) exec aspell "$@" ;;
"-"         ) exec aspell check "$@" ;;
*           ) echo "Ispell compatibility script for Aspell."
              echo "Usage: $0 [options] -a|-l|-v[v]|<file>"
              exit 1 ;;
esac
