lib/scripts/polyml-version
author wenzelm
Tue, 21 Nov 2006 18:07:33 +0100
changeset 21437 a3c55b85cf0e
parent 20758 19be439e35f9
child 21652 3501b5a8a2c1
permissions -rwxr-xr-x
moved theorem kinds from PureThy to Thm;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16996
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     2
#
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     3
# $Id$
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     4
#
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     5
# polyml-version --- determine Poly/ML runtime system version
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     6
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     7
echo -n polyml
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     8
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     9
if [ -x "$ML_HOME/poly" ]; then
20748
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    10
  if [ -x "$ML_HOME/polyimport" ]; then
20758
19be439e35f9 LD_LIBRARY_PATH;
wenzelm
parents: 20748
diff changeset
    11
    env LD_LIBRARY_PATH="$ML_HOME:$ML_HOME/../lib:$LD_LIBRARY_PATH" \
19be439e35f9 LD_LIBRARY_PATH;
wenzelm
parents: 20748
diff changeset
    12
      "$ML_HOME/poly" -v | \
20748
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    13
      sed -n 's,^Poly/ML.*RTS version: [^ ]*\(-[^ ]*\).*$,\1,p'
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    14
  else
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    15
    "$ML_HOME/poly" -noDisplay -r /dev/null | head -n 1 | \
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    16
      sed -n 's,^Poly/ML RTS version [^ ]*\(-[^ ]*\).*$,\1,p'
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    17
  fi
16996
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
    18
fi