Skip to content

Commit

Permalink
Update sourcefiles.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jan 31, 2022
1 parent 9d48b7a commit b73d4f8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sourcefiles.sh
Expand Up @@ -19,12 +19,10 @@ IFS=" " read -r -a CLEAN_FILES <<< "$(echo "${RAW_FILES[*]}" | tr "\r\n" "\n" |

IFS=" " read -r -a CLEAN_INPUT_FILES <<< "$(echo "${INPUT_FILES}" | tr "\r\n" "\n" | tr " " "\n" | awk -v d=" " '{s=(NR==1?s:s d)$0}END{print s}')"

FILES=("${CLEAN_FILES[@]}" "${CLEAN_INPUT_FILES[@]}")
ALL_FILES=("${CLEAN_FILES[@]}" "${CLEAN_INPUT_FILES[@]}")

IFS=" " read -r -a ALL_UNIQUE_FILES <<< "$(echo "${FILES[@]}" | tr "\r\n" "\n" | tr " " "\n" | awk '!a[$0]++' | awk -v d=" " '{s=(NR==1?s:s d)$0}END{print s}')"
echo "Input files: ${ALL_FILES[*]}"

echo "Input files: ${ALL_UNIQUE_FILES[*]}"

echo "::set-output name=files::${ALL_UNIQUE_FILES[*]}"
echo "::set-output name=files::${ALL_FILES[*]}"

echo "::endgroup::"

0 comments on commit b73d4f8

Please sign in to comment.