src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version
author wenzelm
Sat, 18 Jun 2011 21:03:52 +0200
changeset 43448 90aec5043461
parent 41952 c7297638599b
permissions -rwxr-xr-x
more robust caret painting wrt. surrogate characters; discontinued glyphvector drawing -- less special cases;

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

if [ "$ISABELLE_SWIPL" != "" ]; then
  VERSION="$("$ISABELLE_SWIPL" --version)"
  REGEXP='^SWI-Prolog version ([0-9\.]*) for .*$'
  if [[ "$VERSION" =~ $REGEXP ]]; then
    echo -n "${BASH_REMATCH[1]}"
  else
    echo -n undefined
  fi
fi