\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber]{biblatex}
\usepackage{parskip}
\usepackage{tikz}

\begin{filecontents}{\jobname.bib}

@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}

@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}

\end{filecontents}

\pagestyle{empty}
\addbibresource{\jobname.bib}
\newcommand{\resultcolor}{green}

\IfFileExists{\jobname.latexmk.present}
{\newcommand{\ext}{present}}
{\IfFileExists{\jobname.fdb_latexmk}{\newcommand{\ext}{present}}{\newcommand{\ext}{missing}}}

\begin{filecontents}{\jobname.latexmk.\ext}
CHECK
\end{filecontents}

\begin{document}

\section*{ULYSSIS \LaTeX{} Installation Verification Document}

The aim of this document is to verify whether the LaTeX is correctly installed
and TeXstudio is correctly configured on the system.
The first check will verify whether the default compiler is set to latexmk.
The second check will verify whether the default bibliography tool is set to biber.
The final check will verify whether a TeX Live distribution is used (called Mac TeX on Mac OS).

\textbf{Please remove all auxiliary files before compiling the document!}

\IfFileExists{\jobname.latexmk.present}{
\texttt{CHECK : Compiled by latexmk.}
}
{
\texttt{ERROR : Please use latexmk!}
\renewcommand{\resultcolor}{red}
}

\IfFileExists{\jobname.bbl}{
\ifnum0\pdffilesize{\jobname.bbl}>0
\texttt{CHECK : Bibliography isn't empty.}

\else
\texttt{ERROR : Bibliography is empty!}
\renewcommand{\resultcolor}{red}
\fi
}
{
\texttt{ERROR : Bibliography doesn't exist!}
\renewcommand{\resultcolor}{red}
}

\ifnum\pdfmatch{TeX Live}{\pdftexbanner}=1
\texttt{CHECK : Correct distribution installed.}

\else
\texttt{WARNING : Unsupported distribution installed!}
\ifnum\pdfstrcmp{\resultcolor}{green}=0 \renewcommand{\resultcolor}{orange} \fi
\fi

\nocite{*}

\texttt{\pdftexbanner}
\vspace{8\baselineskip}
\printbibliography

\begin{tikzpicture}[remember picture, overlay]
\fill[\resultcolor] (current page.south west) rectangle (current page.east);
\end{tikzpicture}

\end{document}
% Copyright Simon Maenaut 2020 for ULYSSIS
