Skip to content

Commit

Permalink
Fixing gtar on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 21, 2025
1 parent 02e3619 commit 78b0b39
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,17 @@ runs:
tarProg="tar"
fi
printf "tar -tf | sed\n"
${tarProg} -tf "${{ inputs.tarball-name }}" | sed -e 's/\r/\\r/g' | sed -e 's/\n/\\n/g' | sed -e 's/\t/\\t/g' | sed -e 's/ /:space:/g'
printf "tar -tf | grep\n"
${tarProg} -tf "${{ inputs.tarball-name }}" | grep -E '^\.|/\.'
printf "tar -tf | grep | sed\n"
${tarProg} -tf "${{ inputs.tarball-name }}" | grep -E '^\.|/\.' | sed -e 's/\r/\\r/g' | sed -e 's/\n/\\n/g' | sed -e 's/\t/\\t/g' | sed -e 's/ /:space:/g'
printf "::group::${ANSI_LIGHT_BLUE}Removing unwanted files from '${{ inputs.tarball-name }}' ...:${ANSI_NOCOLOR}\n"
while IFS=$'\r\n' read -r file; do
while IFS=$' \r\n' read -r file; do
printf " %s\n" "${file}"
${tarProg} -vf "${{ inputs.tarball-name }}" --delete "${file}"
done <<<$(${tarProg} -tf "${{ inputs.tarball-name }}" | grep -E '^\.|/\.')
Expand Down

0 comments on commit 78b0b39

Please sign in to comment.