1#!/usr/bin/env bash 2# 3# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230) 4# 5# SPDX-License-Identifier: BSD-2-Clause 6# 7 8DIR=$( cd "$( dirname "$BASH_SOURCE[0]}" )" && pwd) 9 10if [ -z $1 ] ; then 11 echo 12 echo "Usage: install.sh ISABELLE_BIN [-P]" 13 echo 14 echo " ISABELLE_BIN isabelle command proofcount should be installed to" 15 echo " -P attempt to patch isabelle to allow metric collection" 16 exit 1 17fi 18 19ISABELLE_TOOL="$1" 20 21export `$ISABELLE_TOOL getenv ISABELLE_PROOFCOUNT_HOME` 22export `$ISABELLE_TOOL getenv ISABELLE_HOME_USER` 23 24if [ -z "$ISABELLE_HOME_USER" ] ; then 25 echo "Missing Isabelle Home" 26 exit 1 27fi 28 29if [ -z "$ISABELLE_PROOFCOUNT_HOME" ] ; then 30 echo "init_component "$DIR/"" >> "$ISABELLE_HOME_USER/etc/settings" 31fi 32 33if [ "$2" = "-P" ] ; then 34 "$ISABELLE_TOOL" proofcount -P 35fi 36 37