Moved version-related configuration into a .config file.

This commit is contained in:
Achim D. Brucker 2019-08-03 21:32:40 +01:00
parent 4040767d1a
commit 8c29055ec6
3 changed files with 19 additions and 9 deletions

6
.config Normal file
View File

@ -0,0 +1,6 @@
DOF_VERSION="Unreleased"
ISABELLE_VERSION="Isabelle2019: June 2019"
ISABELLE_URL="https://isabelle.in.tum.de/website-Isabelle2019/"
DOF_BASE_URL="https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF"
AFP_DATE="afp-2019-06-17"
AFP_URL="https://www.isa-afp.org/release/"$AFP_DATE".tar.gz"

15
install
View File

@ -30,12 +30,8 @@
#set -e #set -e
shopt -s nocasematch shopt -s nocasematch
# Global configuration # get global configuration
ISABELLE_VERSION="Isabelle2019: June 2019" source .config
ISABELLE_URL="https://isabelle.in.tum.de/website-Isabelle2019/"
AFP_DATE="afp-2019-06-17"
AFP_URL="https://www.isa-afp.org/release/"$AFP_DATE".tar.gz"
print_help() print_help()
{ {
@ -187,6 +183,13 @@ install_and_register(){
mkdir -p "$DIR" mkdir -p "$DIR"
cp $GEN_DIR/*/*/*.sty "$DIR" cp $GEN_DIR/*/*/*.sty "$DIR"
ISABELLE_SHORT_VERSION=`echo $ISABELLE_VERSION | sed -e 's/^Isabelle\(.*\):.*/\1/'`
sed -i -e "s|%%% CONFIG %%%| \
\\\\renewcommand{\\\\dof@isabelleversion}{$ISABELLE_SHORT_VERSION}\n \
\\\\renewcommand{\\\\dof@version}{$DOF_VERSION}\n \
\\\\renewcommand{\\\\dof@baseurl}{$DOF_BASE_URL}|" \
"$DIR/DOF-core.sty"
DIR="$ISABELLE_HOME_USER/etc" DIR="$ISABELLE_HOME_USER/etc"
echo " - Registering Isabelle/DOF" echo " - Registering Isabelle/DOF"
mkdir -p "$DIR" mkdir -p "$DIR"

View File

@ -24,10 +24,11 @@
\RequirePackage{etoolbox} \RequirePackage{etoolbox}
\RequirePackage{fp} \RequirePackage{fp}
\newcommand{\dof@isabelleversion}{UNDEFINED}
\newcommand{\dof@version}{UNDEFINED}
\newcommand{\dof@baseurl}{UNDEFINED}
\newcommand{\dof@isabelleversion}{2019} %%% CONFIG %%%
\newcommand{\dof@version}{Unreleased}
\newcommand{\dof@baseurl}{https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF}
\newcommand{\isabelleversion}{\dof@isabelleversion\xspace} \newcommand{\isabelleversion}{\dof@isabelleversion\xspace}
\newcommand{\dofversion}{\dof@version\xspace} \newcommand{\dofversion}{\dof@version\xspace}