src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version
author wenzelm
Mon Dec 20 15:19:15 2010 +0100 (2010-12-20)
changeset 41308 9e576ec5c0dc
parent 40243 3102b27ca03a
child 41690 53b1da988e75
permissions -rwxr-xr-x
tuned/clarified some component settings;
explicit comments about common mistakes;
bulwahn@40243
     1
#!/usr/bin/env bash
bulwahn@40243
     2
#
bulwahn@40243
     3
# Author: Lukas Bulwahn, TU Muenchen, 2010
bulwahn@40243
     4
#
bulwahn@40243
     5
# Determine SWI-Prolog version
bulwahn@40243
     6
bulwahn@40243
     7
if [ "$EXEC_SWIPL" = "" ]; then
bulwahn@40243
     8
  echo ""
bulwahn@40243
     9
else
wenzelm@41308
    10
  # FIXME does not allow spaces in $EXEC_SWIPL
wenzelm@41308
    11
  # FIXME "expr match" not portable
wenzelm@41308
    12
  # FIXME prefer $(...) in bash
bulwahn@40243
    13
  VERSION=`$EXEC_SWIPL --version`
bulwahn@40243
    14
  echo `expr match "$VERSION" 'SWI-Prolog version \([0-9\.]*\)'`
bulwahn@40243
    15
fi