#!/bin/sh

case "$1" in
    --localscan-apiversion)
        sed -rn 's/#define LOCAL_SCAN_ABI_VERSION_(MAJOR|MINOR) *([0-9]+).*/\2/p' \
            /usr/include/exim4/local_scan.h \
            | (read MAJOR; read MINOR; echo ${MAJOR}.${MINOR})
        ;;
    *)
        echo Usage: $0 --localscan-apiversion
	;;
esac
