lib/scripts/polyml-version
author krauss
Thu, 26 Oct 2006 16:08:40 +0200
changeset 21106 51599a81b308
parent 20758 19be439e35f9
child 21652 3501b5a8a2c1
permissions -rwxr-xr-x
Added "recdef_wf" and "simp" attribute to "wf_measures"

#!/usr/bin/env bash
#
# $Id$
#
# polyml-version --- determine Poly/ML runtime system version

echo -n polyml

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