#!/usr/bin/env bash
#
# $Id: polyml-version,v 1.2 2005/09/15 15:18:57 wenzelm Exp $
#
# polyml-version --- determine Poly/ML runtime system version

echo -n polyml

if [ -x "$ML_HOME/poly" ]; then
  "$ML_HOME/poly" -noDisplay -r /dev/null | head -n 1 | \
    sed -n 's,^Poly/ML RTS version [^ ]*\(-[^ ]*\).*$,\1,p'
fi
