using third github action for TeX Live install
parent
d725200dc1
commit
c8ec753ce7
|
@ -20,16 +20,18 @@ jobs:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# - name: "install TeXLive"
|
- name: "Setup TeX Live"
|
||||||
# # Actually pick a version, do not point on master, or the build won't be reproducible
|
# ##
|
||||||
# uses: DanySK/setup-texlive-action@master
|
# uses: DanySK/setup-texlive-action@master
|
||||||
# # You can omit the following if the default path is ok with you
|
|
||||||
# with:
|
# with:
|
||||||
# requirements-file: .github/texlive/requirements.txt
|
# requirements-file: .github/texlive/requirements.txt
|
||||||
- name: "Setup TeX Live"
|
# ##
|
||||||
uses: teatimeguest/setup-texlive-action@v1
|
# uses: teatimeguest/setup-texlive-action@v1
|
||||||
with:
|
# with:
|
||||||
package-file: .github/texlive/requirements.txt
|
# package-file: .github/texlive/requirements.txt
|
||||||
|
# ##
|
||||||
|
uses: paolobrasolin/setup-texlive-action@v1
|
||||||
|
packages-path: ${{ github.workspace }}/.github/texlive/requirements.txt
|
||||||
|
|
||||||
- name: "install tikz-trackschematic"
|
- name: "install tikz-trackschematic"
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -24,16 +24,18 @@ jobs:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# - name: "install TeXLive"
|
- name: "Setup TeX Live"
|
||||||
# # Actually pick a version, do not point on master, or the build won't be reproducible
|
# ##
|
||||||
# uses: DanySK/setup-texlive-action@master
|
# uses: DanySK/setup-texlive-action@master
|
||||||
# # You can omit the following if the default path is ok with you
|
|
||||||
# with:
|
# with:
|
||||||
# requirements-file: .github/texlive/requirements.txt
|
# requirements-file: .github/texlive/requirements.txt
|
||||||
- name: "Setup TeX Live"
|
# ##
|
||||||
uses: teatimeguest/setup-texlive-action@v1
|
# uses: teatimeguest/setup-texlive-action@v1
|
||||||
with:
|
# with:
|
||||||
package-file: .github/texlive/requirements.txt
|
# package-file: .github/texlive/requirements.txt
|
||||||
|
# ##
|
||||||
|
uses: paolobrasolin/setup-texlive-action@v1
|
||||||
|
packages-path: ${{ github.workspace }}/.github/texlive/requirements.txt
|
||||||
|
|
||||||
- name: "install tikz-trackschematic"
|
- name: "install tikz-trackschematic"
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -26,12 +26,15 @@ while getopts ":qb" opt; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## -- variables
|
||||||
|
|
||||||
|
# destination folder inside the TeX Live installation
|
||||||
|
DEVDIR="tex/latex/local/tikz-trackschematic-dev"
|
||||||
|
|
||||||
## -- commands
|
## -- commands
|
||||||
|
|
||||||
TEXlsr=`which mktexlsr`
|
# check for kpsewhich (and mktexlsr)
|
||||||
|
|
||||||
check_texlive() {
|
check_texlive() {
|
||||||
# check for kpsewhich
|
|
||||||
status=0
|
status=0
|
||||||
command -v kpsewhich >/dev/null 2>&1 || status=1
|
command -v kpsewhich >/dev/null 2>&1 || status=1
|
||||||
if [ $status = 0 ]; then
|
if [ $status = 0 ]; then
|
||||||
|
@ -78,9 +81,6 @@ check_texlive
|
||||||
check_sudo
|
check_sudo
|
||||||
|
|
||||||
TEXMFLOCAL=$(kpsewhich --var-value TEXMFLOCAL)
|
TEXMFLOCAL=$(kpsewhich --var-value TEXMFLOCAL)
|
||||||
|
|
||||||
DEVDIR="tex/latex/tikz-trackschematic-dev"
|
|
||||||
|
|
||||||
PROJECTDIR=$(pwd -P)
|
PROJECTDIR=$(pwd -P)
|
||||||
|
|
||||||
if [ "$batch_mode" -eq 0 ]; then
|
if [ "$batch_mode" -eq 0 ]; then
|
||||||
|
@ -101,12 +101,36 @@ fi
|
||||||
|
|
||||||
## -- copying files
|
## -- copying files
|
||||||
|
|
||||||
|
# make sure that destination folder exists
|
||||||
if [ ! -d "$TEXMFLOCAL/$DEVDIR" ]; then
|
if [ ! -d "$TEXMFLOCAL/$DEVDIR" ]; then
|
||||||
$rootrun mkdir -p $TEXMFLOCAL/$DEVDIR
|
$rootrun mkdir -p $TEXMFLOCAL/$DEVDIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# copy every file in src/ and rename it
|
||||||
for SRC in src/*; do
|
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
|
done
|
||||||
|
|
||||||
|
# update TeX Live installation
|
||||||
|
TEXlsr=`which mktexlsr`
|
||||||
|
if [ "$verbose" -eq 1 ]; then
|
||||||
|
$rootrun $TEXlsr
|
||||||
|
else
|
||||||
$rootrun $TEXlsr --quiet
|
$rootrun $TEXlsr --quiet
|
||||||
|
fi
|
||||||
|
|
|
@ -44,7 +44,7 @@ check_trackschematic() {
|
||||||
# check for tikz-trackschematic
|
# check for tikz-trackschematic
|
||||||
status=0
|
status=0
|
||||||
TEXMFLOCAL=$(kpsewhich --var-value TEXMFLOCAL)
|
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
|
ls $TEXMFLOCAL/$DEVDIR/tikz-trackschematic.sty >> /dev/null 2>&1 || status=1
|
||||||
if [ $status = 0 ]; then
|
if [ $status = 0 ]; then
|
||||||
|
|
Loading…
Reference in New Issue