lib/scripts/polyml-version
author wenzelm
Sat, 29 Sep 2007 21:39:52 +0200
changeset 24767 b8fb261ce6df
parent 21652 3501b5a8a2c1
child 29145 b1c6f4563df7
permissions -rwxr-xr-x
removed redundant const_constraint; add_const_constraint: proper certification; prepare_dummies: avoid imperative features; term_check: separate phases, standard_infer_types passes inference parameters instead of frees/vars; Syntax.install_operations: dummy unparsers;

#!/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" \
      DYLD_LIBRARY_PATH="$ML_HOME:$ML_HOME/../lib:$DYLD_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