src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version
changeset 52638 c1adf8b2eccf
parent 52631 564a108d722f
child 52639 df830310e550
equal deleted inserted replaced
52631:564a108d722f 52638:c1adf8b2eccf
     1 #!/usr/bin/env bash
       
     2 #
       
     3 # Author: Lukas Bulwahn, TU Muenchen, 2010
       
     4 #
       
     5 # Determine SWI-Prolog version
       
     6 
       
     7 if [ "$ISABELLE_SWIPL" != "" ]; then
       
     8   VERSION="$("$ISABELLE_SWIPL" --version)"
       
     9   REGEXP='^SWI-Prolog version ([0-9\.]*) for .*$'
       
    10   if [[ "$VERSION" =~ $REGEXP ]]; then
       
    11     echo -n "${BASH_REMATCH[1]}"
       
    12   else
       
    13     echo -n undefined
       
    14   fi
       
    15 fi