#!/bin/sh

while [ "$1" != "" ]; do
    case "$1" in
	--enable-ssr)
	    echo "theories/fhrel.v" >>_RocqProject
	    ;;
	--disable-ssr)
	    sed --in-place '/theories\/fhrel\.v/d' _RocqProject || echo "warning: sed failed to remove fhrel.v"
	    ;;
	--enable-aac)
	    echo "theories/rewriting_aac.v" >>_RocqProject
	    ;;
	--disable-aac)
	    sed --in-place '/theories\/rewriting_aac\.v/d' _RocqProject || echo "warning: sed failed to remove rewriting_aac.v"
	    ;;
	*)
	    echo "unknown option"
	    ;;
    esac
    shift
done
