fix: install correct pygments package for debian and ubuntu
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Markus Pesch 2022-03-03 22:30:37 +01:00
parent cf5c40a692
commit c8488d5ab3
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 25 additions and 6 deletions

View File

@ -10,6 +10,9 @@ LABEL maintainer="Markus Pesch <markus.pesch@cryptic.systems>"
# Environment
ENV DEBIAN_FRONTEND="noninteractive"
# set shell
SHELL [ "/bin/bash", "-c" ]
# Runs
RUN apt-get update
RUN apt-get upgrade --yes
@ -22,9 +25,16 @@ RUN apt-get install --yes \
make \
texlive-full
# version specific packages
RUN if [ $(cat /etc/debian_version) != "11.0" ]; then apt-get install --yes python-pygments; fi
RUN if [ $(cat /etc/debian_version) = "11.0" ]; then apt-get install --yes python3-pygments; fi
# install distribution specific versions
RUN case "$(cat /etc/debian_version)" in \
11*) \
apt-get install --yes python3-pygments \
;; \
*) \
apt-get install --yes python-pygments \
;; \
esac
# remove dpkg lists
RUN rm --recursive --force /var/lib/apt/lists/*

View File

@ -10,6 +10,9 @@ LABEL maintainer="Markus Pesch <markus.pesch@cryptic.systems>"
# Environment
ENV DEBIAN_FRONTEND="noninteractive"
# set shell
SHELL [ "/bin/bash", "-c" ]
# Runs
RUN apt-get update
RUN apt-get upgrade --yes
@ -23,9 +26,15 @@ RUN apt-get install --yes \
texlive-full \
xindy
# version specific packages
RUN if [ $(cat /etc/debian_version) != "bullseye/sid" ]; then apt-get install --yes python-pygments; fi
RUN if [ $(cat /etc/debian_version) = "bullseye/sid" ]; then apt-get install --yes python3-pygments; fi
# install distribution specific versions
RUN case "$(cat /etc/debian_version)" in \
bullseye/sid*) \
apt-get install --yes python3-pygments \
;; \
*) \
apt-get install --yes python-pygments \
;; \
esac
# remove dpkg lists
RUN rm --recursive --force /var/lib/apt/lists/*