lib/scripts/polyml-version
author nipkow
Wed, 04 Mar 2009 10:47:20 +0100
changeset 30235 58d147683393
parent 29145 b1c6f4563df7
child 31695 36c5c15597f2
permissions -rwxr-xr-x
Made Option a separate theory and renamed option_map to Option.map
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
# polyml-version --- determine Poly/ML runtime system version
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     4
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     5
echo -n polyml
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     6
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
     7
if [ -x "$ML_HOME/poly" ]; then
20748
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
     8
  if [ -x "$ML_HOME/polyimport" ]; then
20758
19be439e35f9 LD_LIBRARY_PATH;
wenzelm
parents: 20748
diff changeset
     9
    env LD_LIBRARY_PATH="$ML_HOME:$ML_HOME/../lib:$LD_LIBRARY_PATH" \
21652
3501b5a8a2c1 set DYLD_LIBRARY_PATH as well;
wenzelm
parents: 20758
diff changeset
    10
      DYLD_LIBRARY_PATH="$ML_HOME:$ML_HOME/../lib:$DYLD_LIBRARY_PATH" \
20758
19be439e35f9 LD_LIBRARY_PATH;
wenzelm
parents: 20748
diff changeset
    11
      "$ML_HOME/poly" -v | \
20748
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    12
      sed -n 's,^Poly/ML.*RTS version: [^ ]*\(-[^ ]*\).*$,\1,p'
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    13
  else
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    14
    "$ML_HOME/poly" -noDisplay -r /dev/null | head -n 1 | \
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    15
      sed -n 's,^Poly/ML RTS version [^ ]*\(-[^ ]*\).*$,\1,p'
4bcf492c6c9d adapted to pre-5.0 versions;
wenzelm
parents: 17419
diff changeset
    16
  fi
16996
32afaa947f6e determine Poly/ML runtime system version
wenzelm
parents:
diff changeset
    17
fi