Skip to content

Commit

Permalink
readarray
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Feb 17, 2024
1 parent 6a61edd commit e1142b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ cd "${GITHUB_WORKSPACE-/w}"
tlmgr option repository ctan
tlmgr --verify-repo=none update --self

names=( "${INPUT_PACKAGES}" )
readarray -t packages < <(echo "${INPUT_PACKAGES}")
if [ -n "${INPUT_DEPENDS}" ]; then
names=( $(cut -d' ' -f2 "${INPUT_DEPENDS}" | uniq) )
readarray -t packages < <(cut -d' ' -f2 "${INPUT_DEPENDS}" | uniq)
fi

if [ ! "${#names[@]}" -eq 0 ]; then
tlmgr --verify-repo=none install "${names[@]}"
tlmgr --verify-repo=none --no-auto-remove update "${names[@]}" || echo 'UPDATE FAILED'
if [ ! "${#packages[@]}" -eq 0 ]; then
tlmgr --verify-repo=none install "${packages[@]}"
tlmgr --verify-repo=none --no-auto-remove update "${packages[@]}" || echo 'UPDATE FAILED'
fi

cd "${INPUT_PATH-.}"
ls -al
opts=( ${INPUT_OPTS} )
readarray -t opts < <(echo "${INPUT_OPTS}")
${INPUT_CMD} "${opts[@]}"

0 comments on commit e1142b7

Please sign in to comment.