lib/scripts/polyml-version
author krauss
Tue, 21 Apr 2009 09:53:27 +0200
changeset 30908 7ccf4a3d764c
parent 29145 b1c6f4563df7
child 31695 36c5c15597f2
permissions -rwxr-xr-x
replace type cong = {thm : thm, lhs : term} by plain thm -- the other component has been unused for a long time.

#!/usr/bin/env bash
#
# 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