From c716a2e3c629af43e33750d996c4d344da094134 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 15 Mar 2024 14:50:24 +0100 Subject: use svn to checkout current/dev sources instead of ctan --- checkout-tl.sh | 39 ++++++++++++++++++++++++++++++++------- tl-build.sh | 7 +------ variables.conf | 2 +- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/checkout-tl.sh b/checkout-tl.sh index 4d42437..ee3795c 100755 --- a/checkout-tl.sh +++ b/checkout-tl.sh @@ -1,12 +1,37 @@ #!/bin/sh +PWD=$(pwd) + +. ${PWD}/variables.conf + +function check_branch { + URL=$(svn info | grep ^URL | sed 's/.*: //') +} + if [[ $1 == "dev" ]];then rsync -a --delete --exclude=.svn tug.org::tldevsrc/Build/source . else - # source variables - PWD=$(pwd) - TMPDIR=$(mktemp -d) - . ${PWD}/variables.conf - [[ -d "texlive-${TL_PUBDATE}-source" ]] && rm -rf texlive-${TL_PUBDATE}-source - wget --show-progress https://mirrors.ctan.org/systems/texlive/Source/texlive-${TL_PUBDATE}-source.tar.xz -P ${TMPDIR}/ - xzcat ${TMPDIR}/texlive-${TL_PUBDATE}-source.tar.xz | tar xf - + if [[ -d ${PWD}/source ]];then + cd ${PWD}/source + svn info 2>/dev/null + if [[ $? -ne 0 ]];then + cd ${PWD} + rm -rf ${PWD}/source + svn co --config-option config:miscellany:use-commit-times=yes \ + svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source + else + check_branch + if [[ ${URL} == "svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source" ]];then + svn revert -R . + svn cleanup . --remove-unversioned --remove-ignored + svn update + else + echo "I don't know what to do with your source/ directory. Please rename it" + echo "or remove it then re-run this command." + fi + fi + else + svn co --config-option config:miscellany:use-commit-times=yes \ + svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source + fi + cd ${PWD} fi diff --git a/tl-build.sh b/tl-build.sh index 84d0803..5cef9a1 100755 --- a/tl-build.sh +++ b/tl-build.sh @@ -3,12 +3,7 @@ # Public domain. Originally written 2005 by Karl Berry. this_dir=`pwd` -if [[ $1 == "dev" ]];then - tl_sourcedir=${this_dir}/source -else - . ${this_dir}/variables.conf - tl_sourcedir=${this_dir}/texlive-${TL_PUBDATE}-source -fi +tl_sourcedir=${this_dir}/source echo "" echo " TeX Live for OpenBSD built script " diff --git a/variables.conf b/variables.conf index a8ecdcb..6247164 100644 --- a/variables.conf +++ b/variables.conf @@ -1 +1 @@ -TL_PUBDATE=20240311 \ No newline at end of file +TL_BRANCH=2024 -- cgit v1.2.3