summaryrefslogtreecommitdiff
path: root/Build/source/texk/gregorio/gregorio-src/install-gtex.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/gregorio/gregorio-src/install-gtex.sh')
-rwxr-xr-xBuild/source/texk/gregorio/gregorio-src/install-gtex.sh48
1 files changed, 41 insertions, 7 deletions
diff --git a/Build/source/texk/gregorio/gregorio-src/install-gtex.sh b/Build/source/texk/gregorio/gregorio-src/install-gtex.sh
index d0183efae3e..8501843a4e4 100755
--- a/Build/source/texk/gregorio/gregorio-src/install-gtex.sh
+++ b/Build/source/texk/gregorio/gregorio-src/install-gtex.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright (C) 2015 The Gregorio Project (see CONTRIBUTORS.md)
-#
+#
# This file is part of Gregorio.
#
# Gregorio is free software: you can redistribute it and/or modify
@@ -57,20 +57,40 @@
# Creates a TDS-ready archive named gregoriotex.tds.zip
#
-TEXFILES=(tex/*.tex tex/gregorio*.sty tex/*.lua tex/*.dat)
-TTFFILES=(gregorio.ttf greciliae.ttf parmesan.ttf gregorio-op.ttf
- greciliae-op.ttf parmesan-op.ttf greextra.ttf gregall.ttf
+VERSION=`head -1 .gregorio-version`
+FILEVERSION=`echo $VERSION | sed 's/\./_/g'`
+
+TEXFILES=(tex/gregoriotex*.tex tex/gsp-default.tex tex/gregoriotex*.lua
+ tex/*.dat)
+LATEXFILES=(tex/gregorio*.sty)
+TTFFILES=(gregorio.ttf greciliae.ttf granapadano.ttf gregorio-op.ttf
+ greciliae-op.ttf granapadano-op.ttf greextra.ttf gregall.ttf
gresgmodern.ttf)
-DOCFILES=(fonts/README.md)
-FONTSRCFILES=(gregorio-base.sfd parmesan-base.sfd greciliae-base.sfd
+DOCFILES=(doc/Appendix*.tex doc/Command*.tex doc/Gabc.tex
+ doc/*Ref.tex doc/*Ref.lua doc/*.gabc
+ doc/Gregorio*Ref.pdf)
+EXAMPLEFILES=(examples/FactusEst.gabc examples/PopulusSion.gabc
+ examples/main-lualatex.tex examples/debugging.tex)
+FONTSRCFILES=(gregorio-base.sfd granapadano-base.sfd greciliae-base.sfd
greextra.sfd squarize.py convertsfdtottf.py gregall.sfd
- gresgmodern.sfd)
+ gresgmodern.sfd README.md)
+# Files which have been eliminated, or whose installation location have been
+# changed. We will remove existing versions of these files in the target texmf
+# tree before installing.
+LEGACYFILES=(tex/luatex/gregoriotex/gregoriotex.sty
+ tex/luatex/gregoriotex/gregoriosyms.sty
+ tex/luatex/gregoriotex/gregoriotex-ictus.tex
+ fonts/truetype/public/gregoriotex/parmesan.ttf
+ fonts/truetype/public/gregoriotex/parmesan-op.ttf
+ fonts/source/gregoriotex/parmesan-base.sfd)
NAME=${NAME:-gregoriotex}
FORMAT=${FORMAT:-luatex}
+LATEXFORMAT=${LATEXFORMAT:-lualatex}
TEXHASH=${TEXHASH:-texhash}
KPSEWHICH=${KPSEWHICH:-kpsewhich}
CP=${CP:-cp}
+RM=${RM:-rm}
TTFFILES=("${TTFFILES[@]/#/fonts/}")
FONTSRCFILES=("${FONTSRCFILES[@]/#/fonts/}")
@@ -138,10 +158,24 @@ function install_to {
$CP "$@" "$dir" || die
}
+function find_and_remove {
+ for files in $1; do
+ target="${TEXMFROOT}/${files}"
+ if [ -e "$target" ]; then
+ $RM -f "$target"
+ fi
+ done
+}
+
+echo "Removing old files"
+find_and_remove "${LEGACYFILES[@]}"
+
echo "Installing in '${TEXMFROOT}'."
install_to "${TEXMFROOT}/tex/${FORMAT}/${NAME}" "${TEXFILES[@]}"
+install_to "${TEXMFROOT}/tex/${LATEXFORMAT}/${NAME}" "${LATEXFILES[@]}"
install_to "${TEXMFROOT}/fonts/truetype/public/${NAME}" "${TTFFILES[@]}"
install_to "${TEXMFROOT}/doc/${FORMAT}/${NAME}" "${DOCFILES[@]}"
+install_to "${TEXMFROOT}/doc/${FORMAT}/${NAME}/examples" "${EXAMPLEFILES[@]}"
install_to "${TEXMFROOT}/fonts/source/${NAME}" "${FONTSRCFILES[@]}"
if [ "$arg" = 'tds' ]