Skip to content

Commit

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

read -r -a packages < <(echo "${INPUT_PACKAGES}")
packages=()
while IFS= read -r p; do
packages+=( "${p}" )
done < <( echo "${INPUT_PACKAGES}" )

if [ -n "${INPUT_DEPENDS}" ]; then
read -r -a packages < <(cut -d' ' -f2 "${INPUT_DEPENDS}" | uniq)
while IFS= read -r p; do
packages+=( "${p}" )
done < <( cut -d' ' -f2 "${INPUT_DEPENDS}" | uniq )
fi

if [ ! "${#packages[@]}" -eq 0 ]; then
Expand All @@ -42,5 +48,9 @@ fi

cd "${INPUT_PATH-.}"
ls -al
read -r -a opts < <(echo "${INPUT_OPTS}")

opts=()
while IFS= read -r o; do
opts+=( "${o}" )
done < <( echo "${INPUT_OPTS}" )
${INPUT_CMD} "${opts[@]}"

0 comments on commit c3d6388

Please sign in to comment.