3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-17 19:17:45 +00:00

Update sourcefiles.sh

This commit is contained in:
Tonye Jack 2022-01-31 15:07:53 -05:00 committed by GitHub
parent 9d48b7acf4
commit b73d4f8d3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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::"