src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version
author wenzelm
Sun, 09 Jan 2011 21:33:41 +0100
changeset 41486 82c1e348bc18
parent 41308 9e576ec5c0dc
child 41690 53b1da988e75
permissions -rwxr-xr-x
reverted 08240feb69c7 -- breaks positions of reports;

#!/usr/bin/env bash
#
# Author: Lukas Bulwahn, TU Muenchen, 2010
#
# Determine SWI-Prolog version

if [ "$EXEC_SWIPL" = "" ]; then
  echo ""
else
  # FIXME does not allow spaces in $EXEC_SWIPL
  # FIXME "expr match" not portable
  # FIXME prefer $(...) in bash
  VERSION=`$EXEC_SWIPL --version`
  echo `expr match "$VERSION" 'SWI-Prolog version \([0-9\.]*\)'`
fi