#! /bin/sh

while IFS=: read key val; do
    tval=$(echo $val | sed "s/'/\'/g")
    case $key in
        Name)
            tartan="$tval"
            ;;
        Sett)
            sett="$tval"
            ;;
        "")
            break
            ;;
    esac
done

m4 -DTARTAN="$tartan" -DSETT="$sett" -DIMAGE="$1" $2 -