src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version
author wenzelm
Tue, 05 Apr 2011 14:25:18 +0200
changeset 42224 578a51fae383
parent 41952 c7297638599b
permissions -rwxr-xr-x
discontinued special treatment of structure Ast: no pervasive content, no inclusion in structure Syntax;

#!/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