using third github action for TeX Live install

master
Martin Scheidt 2022-02-09 17:25:15 +01:00
parent d725200dc1
commit c8ec753ce7
4 changed files with 51 additions and 23 deletions

View File

@ -20,16 +20,18 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v2
# - name: "install TeXLive"
# # Actually pick a version, do not point on master, or the build won't be reproducible
- name: "Setup TeX Live"
# ##
# uses: DanySK/setup-texlive-action@master
# # You can omit the following if the default path is ok with you
# with:
# requirements-file: .github/texlive/requirements.txt
- name: "Setup TeX Live"
uses: teatimeguest/setup-texlive-action@v1
with:
package-file: .github/texlive/requirements.txt
# ##
# uses: teatimeguest/setup-texlive-action@v1
# with:
# package-file: .github/texlive/requirements.txt
# ##
uses: paolobrasolin/setup-texlive-action@v1
packages-path: ${{ github.workspace }}/.github/texlive/requirements.txt
- name: "install tikz-trackschematic"
run: |

View File

@ -24,16 +24,18 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v2
# - name: "install TeXLive"
# # Actually pick a version, do not point on master, or the build won't be reproducible
- name: "Setup TeX Live"
# ##
# uses: DanySK/setup-texlive-action@master
# # You can omit the following if the default path is ok with you
# with:
# requirements-file: .github/texlive/requirements.txt
- name: "Setup TeX Live"
uses: teatimeguest/setup-texlive-action@v1
with:
package-file: .github/texlive/requirements.txt
# ##
# uses: teatimeguest/setup-texlive-action@v1
# with:
# package-file: .github/texlive/requirements.txt
# ##
uses: paolobrasolin/setup-texlive-action@v1
packages-path: ${{ github.workspace }}/.github/texlive/requirements.txt
- name: "install tikz-trackschematic"
run: |

View File

@ -26,12 +26,15 @@ while getopts ":qb" opt; do
esac
done
## -- variables
# destination folder inside the TeX Live installation
DEVDIR="tex/latex/local/tikz-trackschematic-dev"
## -- commands
TEXlsr=`which mktexlsr`
# check for kpsewhich (and mktexlsr)
check_texlive() {
# check for kpsewhich
status=0
command -v kpsewhich >/dev/null 2>&1 || status=1
if [ $status = 0 ]; then
@ -78,9 +81,6 @@ check_texlive
check_sudo
TEXMFLOCAL=$(kpsewhich --var-value TEXMFLOCAL)
DEVDIR="tex/latex/tikz-trackschematic-dev"
PROJECTDIR=$(pwd -P)
if [ "$batch_mode" -eq 0 ]; then
@ -101,12 +101,36 @@ fi
## -- copying files
# make sure that destination folder exists
if [ ! -d "$TEXMFLOCAL/$DEVDIR" ]; then
$rootrun mkdir -p $TEXMFLOCAL/$DEVDIR
fi
# copy every file in src/ and rename it
for SRC in src/*; do
$rootrun ln -sfn $PROJECTDIR/$SRC $TEXMFLOCAL/$DEVDIR/${SRC##*/}
FILE=$(basename "$SRC") # remove path
NAME=${FILE%.*} # remove extension
PREFIX=${NAME%%.*}
POSTFIX=${NAME#*.}
EXT=${SRC##*.}
if [ "$PREFIX" = "$POSTFIX" ]; then
DST="$PREFIX-dev.$EXT"
else
DST="$PREFIX-dev.$POSTFIX.$EXT"
fi
$rootrun ln -sfn $PROJECTDIR/$SRC $TEXMFLOCAL/$DEVDIR/$DST
if [ "$verbose" -eq 1 ]; then
echo "linked '$DST'"
fi
done
$rootrun $TEXlsr --quiet
# update TeX Live installation
TEXlsr=`which mktexlsr`
if [ "$verbose" -eq 1 ]; then
$rootrun $TEXlsr
else
$rootrun $TEXlsr --quiet
fi

View File

@ -44,7 +44,7 @@ check_trackschematic() {
# check for tikz-trackschematic
status=0
TEXMFLOCAL=$(kpsewhich --var-value TEXMFLOCAL)
DEVDIR="tex/latex/tikz-trackschematic-dev"
DEVDIR="tex/latex/local/tikz-trackschematic-dev"
ls $TEXMFLOCAL/$DEVDIR/tikz-trackschematic.sty >> /dev/null 2>&1 || status=1
if [ $status = 0 ]; then