#!/bin/sh
algo="d" #algorythm, Dubois by default
-model="gm" #color model, green-magenta by default
+model="rc" #color model, green-magenta by default
param="" #leave blank, will be -$algo$model
left=''
right=''
while [ -n "$1" ]; do
case "$1" in
- -d|--dubois]) algo="d"
- ;;
- -f|--full|--full-color]) algo="f"
- ;;
- -h|--half|--half-color]) algo="d"
- ;;
- -rc|--rc|--red-cyan) model="rc"
- ;;
- -mc|--mc|--magenta-cyan) model="mc"
- ;;
- -gm|--gm|--green-magenta) model="gm"
- ;;
- -ab|--ab|--amber-blue|yellow-blue) model="ab"
- ;;
- -[dfh]rc|-[dfh]gm|-[fd]mc|-dab) param="$1"
- ;;
+ -d|--dubois) algo="d";;
+ -f|--full|--full-color) algo="f";;
+ -h|--half|--half-color) algo="d";;
+ -rc|--rc|--red-cyan) model="rc";;
+ -mc|--mc|--magenta-cyan) model="mc";;
+ -gm|--gm|--green-magenta) model="gm";;
+ -ab|--ab|--amber-blue|yellow-blue) model="ab";;
+ -[dfh]rc|-[dfh]gm|-[fe]mc|-dab) param="$1";;
+ -*) echo "no such color model" >/dev/stderr; exit 1;;
*) if [ -z "$left" ]; then
left="$1"
elif [ -z "$right" ]; then