Skip to content

Commit

Permalink
Allow comments in packages file #5
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobrasolin committed Nov 11, 2021
1 parent 1953308 commit b7927e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ runs:
run: |
# Install TeX Live packages (Windows)
## Read nonempty lines from packages file into an array
[array] $TEXLIVE_PACKAGES = (Select-String -Pattern '^$' -NotMatch ${env:TEXLIVE_PACKAGES_PATH}).Line
[array] $TEXLIVE_PACKAGES = (Select-String -Pattern '^(\s*#.*)?$' -NotMatch ${env:TEXLIVE_PACKAGES_PATH}).Line
## Use tlmgr to install the packages
tlmgr install $($TEXLIVE_PACKAGES -join " ")
- name: Install TeX Live packages (Linux or macOS)
Expand All @@ -126,7 +126,7 @@ runs:
run: |
# Install TeX Live packages (Linux or macOS)
## Read nonempty lines from packages file into an array
while IFS=\= read pkg; do TEXLIVE_PACKAGES+=($pkg); done < <(grep --invert-match '^$' "$TEXLIVE_PACKAGES_PATH")
while IFS=\= read pkg; do TEXLIVE_PACKAGES+=($pkg); done < <(grep --invert-match '^(\s*#.*)?$' "$TEXLIVE_PACKAGES_PATH")
## Use tlmgr to install the packages
tlmgr install "${TEXLIVE_PACKAGES[@]}"
Expand Down

0 comments on commit b7927e1

Please sign in to comment.