#!/bin/zsh

if [ ! -f "README.md" ]; then
    echo "Error: the working directory must be the home of NTP4Verif"
    exit 1
fi

first_line=$(head -n 1 README.md)
if [ "$first_line" != "# NTP4Verif" ]; then
    echo "Error: the working directory must be the home of NTP4Verif"
    exit 1
fi

find ./generation/lean -type f -writable -delete
rm ./data/why3/**/lean -rf
rm .lean.cache -f

#ln -s ../../../../../lib/Isabelle/NTP4Verif/BuiltIn.yaml ./generation/isabelle/meta/why3/BuiltIn/BuiltIn.yaml
