author | bulwahn |
Thu, 16 Dec 2010 11:31:07 +0100 | |
changeset 41191 | 4aa6465fec65 |
parent 40546 | f46c902a8438 |
child 41495 | f8c11067e124 |
permissions | -rwxr-xr-x |
#!/usr/bin/env bash # # polyml-version --- determine Poly/ML runtime system version if [ -x "$ML_HOME/poly" ]; then VERSION="$(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)" REGEXP='^Poly/ML.*RTS version: [^ ]*(-[^ ]*).*$' if [[ "$VERSION" =~ $REGEXP ]]; then echo "polyml${BASH_REMATCH[1]}" else echo polyml-unknown fi else echo polyml-unknown fi