Browse Source

new makefile

master
zeus 6 months ago
parent
commit
7c6319d5d7
  1. 17
      install/usr/share/swarmlab.io/sec/extrapackages
  2. 155
      install/usr/share/swarmlab.io/sec/setup.sh

17
install/usr/share/swarmlab.io/sec/extrapackages

@ -1,3 +1,18 @@
multibib
cleveref
unicode-math
wrapfig
float
imakeidx
glossaries
mfirstuc
xfor
datatool
xpatch
siunitx
booktabs
csquotes
tcolorbox
pgf
environ
etoolbox

155
install/usr/share/swarmlab.io/sec/setup.sh

@ -5,45 +5,158 @@ set -o pipefail
scheme="$1"
retry() {
retries=$1
shift
count=0
until "$@"; do
exit=$?
wait="$(echo "2^$count" | bc)"
count="$(echo "$count + 1" | bc)"
if [ "$count" -lt "$retries" ]; then
echo "Retry $count/$retries exited $exit, retrying in $wait seconds..."
sleep "$wait"
else
echo "Retry $count/$retries exited $exit, no more retries left."
return "$exit"
fi
done
}
echo "==> Install system packages"
#apk update
#apk --no-cache add \
# okular
# make \
# xz
#
apk --no-cache add \
bash \
ghostscript \
gnupg \
graphviz \
perl \
py-pygments \
python3 \
tar \
ttf-freefont \
wget \
make \
xz
# Dependencies needed by latexindent
apk --no-cache add \
perl-log-dispatch \
perl-log-log4perl \
perl-namespace-autoclean \
perl-params-validationcompiler \
perl-specio \
perl-unicode-linebreak \
perl-yaml-tiny
apk --no-cache \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
add \
perl-file-homedir
apk update --no-cache
apk upgrade --no-cache
#gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 0D5E5D9106BAB6BC
echo "==> Install TeXLive"
mkdir -p /tmp/install-tl
cd /tmp/install-tl
MIRROR_URL="$(wget -q -S -O /dev/null http://mirror.ctan.org/ 2>&1 | sed -ne 's/.*Location: \(\w*\)/\1/p' | head -n 1)"
wget -nv "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz"
wget -nv "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz.sha512"
wget -nv "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc"
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0D5E5D9106BAB6BC
#gpg --no-default-keyring --keyring trustedkeys.kbx --import /texlive_pgp_keys.asc
#gpgv ./install-tl-unx.tar.gz.sha512.asc ./install-tl-unx.tar.gz.sha512
sha512sum -c ./install-tl-unx.tar.gz.sha512
mkdir -p /tmp/install-tl/installer
tar --strip-components 1 -zxf /tmp/install-tl/install-tl-unx.tar.gz -C /tmp/install-tl/installer
retry 3 /tmp/install-tl/installer/install-tl -profile=/texlive.profile
# Install additional packages for non full scheme
if [ "$scheme" != "full" ]; then
# tlmgr install \
# fmtcount
# tlmgr update --self
tlmgr install \
collection-fontsrecommended \
collection-fontutils \
xgreek \
xltxtra \
biber \
biblatex \
latexmk \
collection-xetex \
polyglossia \
greek-fontenc \
hyphen-english \
hyphen-greek \
xetex \
t2 \
tools \
oberdiek \
bigfoot \
zapfding \
xstring \
datetime \
nomencl \
geometry \
setspace \
footmisc \
tocloft \
fancyhdr \
titlesec \
graphics \
graphics-cfg \
caption \
amsmath \
amscls \
mathspec \
enumitem \
makecell \
multirow \
was \
xcolor \
listings \
ulem \
hyperref \
latexconfig \
url \
natbib \
lastpage \
totcount \
pdfpages \
textcase \
fp \
extsizes \
fmtcount \
koma-script \
pdflscape \
texliveonfly
echo "==> extra packages"
#extrap=/extrapackages
extrap=/extrapackages
if [ -f $extrap ]; then
echo "no"
#while read -r line; do
#extrapackages="$extrapackages $line"
#done < $extrap
while read -r line; do
extrapackages="$extrapackages $line"
done < $extrap
#tlmgr install $extrapackages
tlmgr install $extrapackages
else
echo "No extrapackages file"
fi
# cp /usr/local/texlive/2020/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
cp /usr/local/texlive/2020/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
# apk add --no-cache msttcorefonts-installer
apk add --no-cache msttcorefonts-installer
# update-ms-fonts
update-ms-fonts
# fc-cache -f
fc-cache -f
fi
#texhash
texhash
echo "==> Clean up"
rm -rf \
@ -53,6 +166,8 @@ rm -rf \
/opt/texlive/texdir/texmf-dist/source \
/opt/texlive/texdir/texmf-var/web2c/tlmgr.log \
/root/.gnupg \
/setup.sh \
/extrapackages \
/texlive.profile \
/texlive_pgp_keys.asc \
/tmp/install-tl \

Loading…
Cancel
Save