commit 38ad755ec04dacc55eedb147994fae201734cf62
Author: Scott Kostyshak <[email protected]>
Date: Mon Mar 17 12:29:00 2025 +0100
lyx-tester switches: make shared variables global
This avoids copy/paste errors and keeps things in sync.
---
development/lyx-tester/switches | 43 ++++++++++++++++++-----------------------
1 file changed, 19 insertions(+), 24 deletions(-)
diff --git a/development/lyx-tester/switches b/development/lyx-tester/switches
index 3141edbc24..2ef979f25a 100644
--- a/development/lyx-tester/switches
+++ b/development/lyx-tester/switches
@@ -6,6 +6,25 @@
# the function switches to should be a no-op (with a diagnostic
# message)
+
+# TODO: rename these to begin with "_" to not clutter
+# where to archive the TL version
+polyglossia_dev_d="/home/$(logname)/polyglossia"
+
+# location of TL version
+polyglossia_tl_f="$(/opt/texbin/kpsewhich polyglossia.sty)"
+polyglossia_tl_d="$(dirname "${polyglossia_tl_f}")"
+
+# e.g., "TL25_2025-03-16"
+tl_dirname="$( basename "$( dirname "$( kpsewhich -var-value TEXMFDIST )")")"
+# this is the dir outside of the TL tree where we store the TL polyglossia
+# dir when we replace it with a symlink to the dev dir.
+polyglossia_tl_bu_d="/home/$(logname)/polyglossia_tl/${tl_dirname}"
+
+tl_stable_bu_d="/home/$(logname)/tl-stable-binaries"
+tl_texbin_d="/opt/texbin/"
+
+
function switch-polyglossia-to-dev ()
{
@@ -19,19 +38,6 @@ function switch-polyglossia-to-dev ()
# repo are different so we are notified when we need to update them.
- # where to archive the TL version
- polyglossia_dev_d="/home/$(logname)/polyglossia"
-
- # location of TL version
- polyglossia_tl_f="$(/opt/texbin/kpsewhich polyglossia.sty)"
- polyglossia_tl_d="$(dirname "${polyglossia_tl_f}")"
-
- # e.g., "TL25_2025-03-16"
- tl_dirname="$( basename "$( dirname "$( kpsewhich -var-value TEXMFDIST )")")"
- # this is the dir outside of the TL tree where we store the TL polyglossia
- # dir when we replace it with a symlink to the dev dir.
- polyglossia_tl_bu_d="/home/$(logname)/polyglossia_tl/${tl_dirname}"
-
# check whether link or not link to see whether current is tl or dev.
if [ -L "${polyglossia_tl_d}" ]; then
echo "Link exists, so you are already using polyglossia-dev."
@@ -56,12 +62,6 @@ function switch-polyglossia-to-dev ()
function switch-polyglossia-to-stable ()
{
- polyglossia_tl_f="$(/opt/texbin/kpsewhich polyglossia.sty)"
- polyglossia_tl_d="$(dirname "${polyglossia_tl_f}")"
- tl_dirname="$( basename "$( dirname "$( kpsewhich -var-value TEXMFDIST )")")"
- # this is the dir outside of the TL tree where we store the TL polyglossia
- # dir when we replace it with a symlink to the dev dir.
- polyglossia_tl_bu_d="/home/$(logname)/polyglossia_tl/${tl_dirname}"
if [ -L "${polyglossia_tl_d}" ]; then
sudo rm "${polyglossia_tl_d}"
sudo mv "${polyglossia_tl_bu_d}" "${polyglossia_tl_d}"
@@ -79,9 +79,6 @@ function switch-polyglossia-to-stable ()
# in a script that updates the TeX Live installation.
function polyglossia-is-stable ()
{
- polyglossia_tl_f="$(/opt/texbin/kpsewhich polyglossia.sty)"
- polyglossia_tl_d="$(dirname "${polyglossia_tl_f}")"
- polyglossia_tl_bu_d="/home/$(logname)/polyglossia_tl"
if [ -L "${polyglossia_tl_d}" ]; then
# 0 = no, not stable
echo "0"
@@ -93,8 +90,6 @@ function polyglossia-is-stable ()
}
-tl_stable_bu_d="/home/$(logname)/tl-stable-binaries"
-tl_texbin_d="/opt/texbin/"
function switch-latex-to-tl-dev ()
{
if [ ! -e "${tl_stable_bu_d}" ]; then
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs