lib/scripts/polyml-version
author wenzelm
Wed, 03 Nov 2010 10:18:05 +0100
changeset 40312 dff9f73a3763
parent 31695 36c5c15597f2
child 40546 f46c902a8438
permissions -rwxr-xr-x
more conventional exceptions for abstract syntax operations -- eliminated ancient SYS_ERROR; proper signature constraint;

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

echo -n polyml

if [ -x "$ML_HOME/poly" ]; 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 -H 10 | \
    sed -n 's,^Poly/ML.*RTS version: [^ ]*\(-[^ ]*\).*$,\1,p'
fi