#!/bin/sh

# Extract CMake macros during configure
PREFIX="/usr/local"
FLAVOR="mcstas"
VERSION="2.9999-svn"
MC="mc"
NO_ALTERNATIVES=""

# Include installation path before any attempt to postconfig
export PATH=${PREFIX}/${FLAVOR}/${VERSION}/bin:${PATH}
MCCODE=${FLAVOR}

# Remove html files if mcdoc is no longer installed
if [ ! -x ${PREFIX}/${FLAVOR}/${VERSION}/bin/${MC}doc ]; then
    find ${PREFIX}/${FLAVOR}/${VERSION}/ -iname '*.instr' -or -iname '*.comp' | \
        while read comp; do
        rm -f $(dirname ${comp})/$(basename ${comp} .instr).html ;
        rm -f $(dirname ${comp})/$(basename ${comp} .comp).html ;
    done
fi
