Compare commits

...

4 Commits

1 changed files with 10 additions and 7 deletions

17
install
View File

@ -114,11 +114,11 @@ check_afp_entries() {
}
check_isa_dof_patch() {
echo "* Check availabilty of Isabelle/DOF patch:"
echo "* Check availability of Isabelle/DOF patch:"
src="patches/thy_output.ML"
dst="$ISABELLE_HOME/src/Pure/Thy/thy_output.ML"
if command -v md5sum > /dev/null 2>&1 && [[ $(md5sum "$src" | cut -d' ' -f1) = $(md5sum "$dst" | cut -d' ' -f1) ]]; then
if command -v cmp > /dev/null 2>&1 && cmp -s "$src" "$dst" ; then
echo " Success: latest Isabelle/DOF patch already applied"
if isabelle process -e 'Thy_Output.set_meta_args_parser' &> /dev/null ; then
true
@ -126,16 +126,19 @@ check_isa_dof_patch() {
echo " Warning: Isabelle/HOL needs to be rebuild to activate patch."
fi
else
command -v md5sum >/dev/null 2>&1 || echo " Warning: md5sum not available, cannot check if patch is already applied."
command -v cmp >/dev/null 2>&1 || echo " Warning: cmp not available, cannot check if patch is already applied."
echo " Warning: Isabelle/DOF patch is not available or outdated."
echo " Trying to patch system ...."
if (cp $dst $dst.backup-by-isadof-installer && cp -f $src $dst) &> /dev/null; then
if [ ! -f "$dst.backup-by-isadof-installer" ]; then
cp -f "$dst" "$dst.backup-by-isadof-installer" || true;
fi
if (cp -f $src $dst) &> /dev/null; then
echo " Applied patch successfully, Isabelle/HOL will be rebuilt during"
echo " the next start of Isabelle."
else
echo " FAILURE: Could not apply Isabelle/DOF patch."
echo " Please copy patches/thy_output.ML to $ISABELLE_HOME/src/Pure/Thy/:"
echo " cp patches/thy_output.ML $ISABELLE_HOME/src/Pure/Thy/"
echo " Please copy $src to $dst, e.g.:"
echo " cp -f $src $dst"
echo " and rebuild Isabelle/HOL."
exit_error
fi
@ -149,7 +152,7 @@ check_old_installation(){
rm -rf "$ISABELLE_HOME_USER/DOF.bak"
mv "$ISABELLE_HOME_USER/DOF" "$ISABELLE_HOME_USER/DOF.bak"
else
echo " No old instllation found."
echo " No old installation found."
fi
}