Skip to content

Commit

Permalink
upload-to-s3: skip compression if src is .xz file
Browse files Browse the repository at this point in the history
Skip the compression with `xz` if the source file is already a
compressed `.xz` file.
  • Loading branch information
joverlee521 committed Oct 18, 2021
1 parent 6a8fc0c commit c866eb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/upload-to-s3
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ main() {
echo "Uploading $src$dst"
if [[ "$dst" == *.gz ]]; then
gzip -c "$src"
elif [[ "$dst" == *.xz ]]; then
elif [[ "$src" != *.xz && "$dst" == *.xz ]]; then
xz -2 -T0 -c "$src"
else
cat "$src"
Expand Down

0 comments on commit c866eb3

Please sign in to comment.