From ca91c3205aa0e829e73066ca1cca4b65ab67ff9e Mon Sep 17 00:00:00 2001 From: Cervac Petru Date: Mon, 21 Aug 2023 19:40:25 +0100 Subject: [PATCH] fix: fix bug with installing packages (#49) --- .nuke/build.schema.json | 4 ++-- features/src/texlive/devcontainer-feature.json | 2 +- features/src/texlive/install.sh | 4 ++-- features/test/texlive/scenarios.json | 11 +++++++++++ features/test/texlive/two-packages.sh | 7 +++++++ 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 features/test/texlive/two-packages.sh diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 527f6d7..518c1c6 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -72,8 +72,8 @@ "items": { "type": "string", "enum": [ - "BuildDocumentation", "BuildTemplate", + "GenerateDocumentationFeature", "GetFeatures", "GetTemplates", "ListTemplatesAndFeatures", @@ -93,8 +93,8 @@ "items": { "type": "string", "enum": [ - "BuildDocumentation", "BuildTemplate", + "GenerateDocumentationFeature", "GetFeatures", "GetTemplates", "ListTemplatesAndFeatures", diff --git a/features/src/texlive/devcontainer-feature.json b/features/src/texlive/devcontainer-feature.json index 443f238..5515323 100644 --- a/features/src/texlive/devcontainer-feature.json +++ b/features/src/texlive/devcontainer-feature.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainerFeature.schema.json", "id": "texlive", - "version": "3.0.0", + "version": "3.1.0", "name": "texlive", "customizations": { "vscode": { diff --git a/features/src/texlive/install.sh b/features/src/texlive/install.sh index 72b236a..14f8d8e 100644 --- a/features/src/texlive/install.sh +++ b/features/src/texlive/install.sh @@ -1,5 +1,4 @@ #!/bin/sh - apk update apk upgrade apk add \ @@ -62,8 +61,9 @@ echo "tlpdbopt_w32_multi_user 1" >> /root/texlive.profile /root/install-texlive.sh $texlive_version tlmgr install listings if [ $PACKAGES ]; then - sed -e 's/,/ /g' $PACKAGES | xargs tlmgr install + echo "$PACKAGES" | sed -e 's/,/ /g' | xargs tlmgr install fi + rm -f /root/texlive.profile \ /root/install-texlive.sh diff --git a/features/test/texlive/scenarios.json b/features/test/texlive/scenarios.json index a02bf68..c28c8d3 100644 --- a/features/test/texlive/scenarios.json +++ b/features/test/texlive/scenarios.json @@ -30,5 +30,16 @@ ] } } + }, + "two-packages": { + "image": "alpine:latest", + "features": { + "texlive": { + "packages": [ + "listings", + "subfiles" + ] + } + } } } diff --git a/features/test/texlive/two-packages.sh b/features/test/texlive/two-packages.sh new file mode 100644 index 0000000..772ce26 --- /dev/null +++ b/features/test/texlive/two-packages.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "packages: $packages" + +echo "\documentclass[12pt,a4paper]{article} \usepackage{listings} \usepackage{subfiles} \begin{document}Hi\end{document}" > "test.tex" + +pdflatex -interaction=nonstopmode test.tex